close method

  1. @override
void close()
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
void close() {
  if(_workerId != null) {
    _onClose(_workerId!);
  }

  _eventReceiverSubscription.cancel();
  _controller.close();
}