PromptsSharedPref class

PromptsSharedPref to presist data in the app locally A utility class for managing and persisting prompts data locally using shared_preferences.

Constructors

PromptsSharedPref()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addPlace(String query, PlacesModel newPlace) Future
Adds a place to the list for a specific query.
clearPreferences() Future
Clears all stored preferences.
getAllPlaces() Future<Map<String, List<PlacesModel>>>
Gets the entire map of places.
getPlaces(String query) Future<List<PlacesModel>>
Gets the list of places for a specific query.
init() Future
Initializes the SharedPreferences instance for local data storage.
removePlace(String query, PlacesModel placeToRemove) Future
Removes a place from the list for a specific query.
setAllPlaces(Map<String, List<PlacesModel>> data) Future
Sets the entire map of places.
setPlaces(String query, List<PlacesModel> places) Future
Sets the list of places for a specific query.