close method
Closes the sink.
Calling this method more than once is allowed, but does nothing.
Implementation
@override
void close() {
if (_subscriptions != null) {
var listeners = _subscriptions!;
// This will cause an exception to be thrown if a listener is added while
// closing subscriptions.
_subscriptions = null;
for (int i = 0; i < listeners.length; i++) {
listeners[i]._closeSubscription();
}
}
}