close method Null safety
override
Closes the sink.
The add method must not be called after this method.
Calling this method more than once is allowed, but does nothing.
Implementation
@override
Future close() async {
if (!_outboundController.hasListener) {
_outboundController.stream.listen(null);
}
if (!_inboundController.hasListener) {
_inboundController.stream.listen(null);
}
await _outboundController.close();
await _inboundController.close();
}