onDispose method

  1. @protected
  2. @nonVirtual
void onDispose(
  1. VoidCallback func
)
inherited

Call this function to register a callback to be called when disposing (i.e. when State.dispose is called).

  • the registered callbacks will be invoked in reverse order (i.e. the last registered callback will be invoked first).
  • the callbacks are invoked after hookDispose is called.

Implementation

@protected
@nonVirtual
void onDispose(VoidCallback func) {
	this._arrOnDisposeCallbacks.add(func);
}