hydrate method
void
hydrate()
Populates the internal state storage with the latest state.
Implementation
void hydrate() {
final storage = HydratedStateNotifier.storage;
try {
final stateJson = _toJson(state);
if (stateJson != null) {
storage.write(storageToken, stateJson).then((_) {}, onError: onError);
}
} catch (error, stackTrace) {
onError?.call(error, stackTrace);
}
}