FavoritesSharedPref class
FavoritesSharedPref
to presist data in the app locally
A utility class for managing and persisting favorites data locally using shared_preferences
.
Constructors
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
-
addPlace(
PlacesModel place) → Future< void> - Add a PlaceModel to the list
-
addTour(
SavedToursModel tour) → Future< void> - Add a SavedToursModel to the list
-
clearPlacesList(
) → Future< void> - Clear the PlacesModel list
-
clearToursList(
) → Future< void> - Clear the SavedToursModel list
-
getPlacesList(
) → Future< List< PlacesModel> > - Get the list of places
-
getToursList(
) → Future< List< SavedToursModel> > - Get the list of tours
-
isPlaceExist(
String name, String country) → Future< bool> - Check if a place is in the list
-
isTourExist(
String tourName) → Future< bool> - Check if a tour is in the list
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removePlace(
String name, String country) → Future< void> - Remove a PlaceModel from the list
-
removeTour(
String tourName) → Future< void> - Remove a SavedToursModel from the list
-
savePlacesList(
List< PlacesModel> places) → Future<void> - Saving a list of places
-
saveToursList(
List< SavedToursModel> tours) → Future<void> - //////////////////////////////////////////////////////////////////////////////////////////////////////// Saving a list of tours
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited