dispose method

  1. @override
void dispose()
override

Fails pending awaitable effects and closes the side effects stream. Cancels queued intents if the dispatcher supports JPendingIntentCancellation. Already running handlers and intents are not interrupted. External work must check mounted or use its own cancellation API after asynchronous gaps.

Implementation

@override
void dispose() {
  if (!mounted) return;
  _undoStack.clear();
  _redoStack.clear();
  _history.dispose();
  super.dispose();
}