HydratedNotifier class

Global storage instance used by all hydrated notifiers.

Must be initialized before using any HydratedReactiveNotifier or HydratedViewModel:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  HydratedNotifier.storage = await SharedPreferencesStorage.getInstance();
  runApp(MyApp());
}

Constructors

HydratedNotifier()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

isInitialized bool
Whether the storage has been initialized.
no setter
storage HydratedStorage
The global storage instance.
getter/setter pair

Static Methods

resetStorage() → void
Resets the storage instance.