addPlace static method
- String query,
- PlacesModel newPlace
Adds a place to the list for a specific query.
Implementation
static Future addPlace(String query, PlacesModel newPlace) async {
List<PlacesModel> places = await getPlaces(query);
places.add(newPlace);
await setPlaces(query, places);
}