onClose method

  1. @override
void onClose()
override

Callback invoked when the controller is being removed from Levit.

This method triggers the cleanup of all objects registered via autoDispose.

Always call super.onClose() if overriding. Once closed, the controller is considered disposed and cannot be reused.

Implementation

@override
void onClose() {
  _tasksEngine.cancelAll();
  super.onClose();
}