eventReminderPreferenceProvider top-level property
final
A provider that reads the notification reminder preference from the shared preferences. If set, it will also update the notification reminder preference in the shared preferences.
Implementation
final eventReminderPreferenceProvider = StateProvider<int>((ref) {
final prefs = ref.watch(sharedPreferencesProvider);
final currentValue = prefs.getInt('participatingEventNotification') ?? 30;
ref.listenSelf(
(previous, next) => prefs.setInt('participatingEventNotification', next),
);
return currentValue;
});