FakePreferenceNotifier<T> constructor
- String key, {
- required T defaultValue,
- T? storedValue,
Implementation
FakePreferenceNotifier(
this.key, {
required this.defaultValue,
T? storedValue,
}) : super(defaultValue) {
if (storedValue != null) {
// Emit the stored value after the class is constructed.
Future(() => setValue(storedValue));
}
}