watchBool static method
Preference notifier that starts with the current bool value for the
given key, then emits a new value every time there are chanegs to the
value associated with the given key.
Implementation
static PreferenceNotifier<bool> watchBool(
Ref ref,
String key, {
required bool defaultValue,
}) {
return SharedPreferenceNotifier._(
ref,
(sharedPref) => sharedPref.getBool(key, defaultValue: defaultValue),
defaultValue,
);
}