A simple package providing glue methods between notified_preferences and flutter_riverpod.


Use it like any other provider. Make sure you provide setup an instance of SharedPreferences on startup of your app.

final preferencesProvider = 
    Provider<SharedPreferences>((_) => throw UnimplementedError());

final hasSeenTutorialProvider =
    createSettingProvider(key: 'hasSeenTutorial', initialValue: false);

void main() {
    final preferences = await SharedPreferences.getInstance();

            overrides: [
                preferencesProvider.overrideWith((_) => preferences),
            child: const App(),

class App extends ConsumerWidget {
    Widget build(BuildContext context, WidgetRef ref) {
        final hasSeenTutorial =;

        if (!hasSeenTutorial) return Text("Hello!");

        return OutlinedButton(
            child: Text("Exit tutorial"),
            onPressed: () => = true,

For more guidance, check out notified_preference's page.