Created
November 28, 2024 17:32
-
-
Save vbalagovic/c4d3c918acc75c46b18e648ac29b720c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@riverpod | |
class MovieNotifier extends _$MovieNotifier { | |
@override | |
FutureOr<List<Movie>> build() async { | |
return _fetch(); | |
} | |
Future<List<Movie>> _fetch([String filter = ""]) async { | |
final movieService = ref.read(movieServiceProvider.notifier); | |
return movieService.fetchMovies(filter); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment