Last active
May 14, 2023 21:04
-
-
Save nonsocchi/7d095d6bc931ef6ceb3f6d4d35e668fa to your computer and use it in GitHub Desktop.
riverpod_theme_app: service layer providers.
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
// Creates a themingServiceProvider used by the ThemingController. | |
@riverpod | |
ThemingService themingService(ThemingServiceRef ref) { | |
final prefs = ref.read(prefsProvider); | |
return ThemingService(prefs); | |
} | |
// Override in `Provider Container` when app starts. | |
@riverpod | |
SharedPreferences prefs(PrefsRef ref) => throw UnimplementedError(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment