FakePreferenceNotifier<T> constructor

FakePreferenceNotifier<T>(
  1. String key, {
  2. required T defaultValue,
  3. 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));
  }
}