onClose property

  1. @override
void Function()? onClose
final

A callback function that can be provided to perform custom actions when the associated entity is closed. This function is executed after close is called. If close is Future, then it will be awaited and called onClose.

Example:

SingleAutoClosable(controller, () {
  // Custom actions to be performed when the controller is closed.
});

Implementation

@override
final void Function()? onClose;