setPlaces static method

Future setPlaces(
  1. String query,
  2. List<PlacesModel> places
)

Sets the list of places for a specific query.

Implementation

static Future setPlaces(String query, List<PlacesModel> places) async {
  Map<String, List<PlacesModel>> data = await getAllPlaces();
  data[query] = places;
  await setAllPlaces(data);
}