dispose method
Disposes of the node, closing all stream controllers and cancelling subscriptions.
Implementation
Future<void> dispose() async {
_streamControllerSub?.cancel();
_streamControllerSub = null;
if (!_streamControllerValue.isClosed) {
await _streamControllerValue.close();
}
if (!_streamController.isClosed) {
await _streamController.close();
}
// if (_onDispose != null) {
// _onDispose!.call();
// _onDispose = null;
// }
}