loadSavedState method

void loadSavedState()

Implementation

void loadSavedState() {
  try {
    final cachedStateAsJson = storage.get(storageKey);
    final cachedState = cachedStateAsJson != null
        ? fromJson(
            cachedStateAsJson,
          )
        : null;

    if (cachedState != null) {
      _oldState = cachedState;
      state = cachedState;
    }
  } catch (e, s) {
    onPersistentStateError(e, s);
  }
  _initialized = true;
}