onClose method
Closes the instance. This method should be called when the instance is no longer needed. Once onClose is called, the instance can no longer be used.
Implementation
@override
@mustCallSuper
Future<void> onClose() async {
super.onClose();
// ignore: invalid_use_of_protected_member
Controller.observer.onClose(this);
return await _stateController.close();
}