watchInt static method
Preference notifier that starts with the current int 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<int> watchInt(
Ref ref,
String key, {
required int defaultValue,
}) {
return SharedPreferenceNotifier._(
ref,
(sharedPref) => sharedPref.getInt(key, defaultValue: defaultValue),
defaultValue,
);
}