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