Editing and deleting existing places

The easiest way to add the features to edit and delete items from the database is probably by creating a new screen with a ListView widget, containing all the items that were saved. In order to achieve this, we'll create a new screen in our app, as follows:

  1. In the lib folder, create a new file called manage_places.dart.
  1. After importing the material.dart library, we'll also import the place_dialog.dart file and our dbhelper.dart, as follows:
import 'package:flutter/material.dart';import 'place_dialog.dart';import 'dbhelper.dart';
  1. Inside this file, we'll create a new stateless widget, calling it ManagePlaces. This will contain a Scaffold whose AppBar title is 'Manage Places', and, in the body, we'll ...

Get Flutter Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.