PodFavoritesService class
A POD-based service class that manages the user's movie lists in Solid POD.
- Inheritance
-
- Object
- ChangeNotifier
- PodFavoritesService
Constructors
- PodFavoritesService.new(SharedPreferences _prefs, BuildContext _context, Widget _child)
- Creates a new PodFavoritesService instance.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
toWatchMovies
→ Stream<
List< Movie> > -
Stream of to-watch movies.
no setter
-
watchedMovies
→ Stream<
List< Movie> > -
Stream of watched movies.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addToWatch(
Movie movie) → Future< void> - Adds a movie to the to-watch list and saves to POD.
-
addToWatched(
Movie movie) → Future< void> - Adds a movie to the watched list.
-
dispose(
) → void -
Disposes the stream controllers.
override
-
getMovieComments(
Movie movie) → Future< String?> - Gets the personal comments for a movie from POD.
-
getMovieFilePath(
Movie movie) → String - Gets the file path for a movie file (used for sharing).
-
getPersonalRating(
Movie movie) → Future< double?> - Gets the personal rating for a movie from POD.
-
getToWatch(
{bool forceRefresh = false}) → Future< List< Movie> > - Retrieves the list of to-watch movies from POD cache.
-
getWatched(
{bool forceRefresh = false}) → Future< List< Movie> > - Retrieves the list of watched movies from POD cache.
-
hasMovieFile(
Movie movie) → Future< bool> - Checks if a movie file exists (i.e., user has interacted with this movie).
-
isInToWatch(
Movie movie) → Future< bool> - Checks if a movie is in the to-watch list.
-
isInWatched(
Movie movie) → Future< bool> - Checks if a movie is in the watched list.
-
isPodAvailable(
) → Future< bool> - Checks if POD storage is available and user is logged in.
-
migrateToPod(
) → Future< void> - Migrates data from SharedPreferences to POD.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
refreshUIStreams(
) → Future< void> - Forces a refresh of the UI streams with current data from MovieLists. This ensures the UI shows the latest data after app restart.
-
reloadFromPod(
) → Future< void> - Reloads data from POD after app folders are initialized.
-
removeFromToWatch(
Movie movie) → Future< void> - Removes a movie from the to-watch list and saves to POD.
-
removeFromWatched(
Movie movie) → Future< void> - Removes a movie from the watched list and saves to POD.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeMovieComments(
Movie movie) → Future< void> - Removes the personal comments for a movie from POD.
-
removePersonalRating(
Movie movie) → Future< void> - Removes the user's personal rating for a movie from POD.
-
setMovieComments(
Movie movie, String comments) → Future< void> - Sets the personal comments for a movie and saves to POD.
-
setPersonalRating(
Movie movie, double rating) → Future< void> - Sets the user's personal rating for a movie and saves to POD.
-
syncWithPod(
) → Future< void> - Syncs data between POD and local cache.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited