persistOnDispose method

void persistOnDispose(
  1. T state
)

Implementation

void persistOnDispose(T state) async {
  clearUndoStack();
  if (persistanceProvider == null) {
    return;
  }
  if (persistanceProvider != null) {
    storageProviders.remove(persistanceProvider);
  }
  if (persistanceProvider!.persistOn != PersistOn.disposed) {
    return;
  }
  await persistanceProvider!.write(state);
}