close method

  1. @mustCallSuper
  2. @override
void close()
override

Closes the sink.

Calling this method more than once is allowed, but does nothing.

Neither add nor addError must be called after this method.

Implementation

@mustCallSuper
@override
void close() {
  _controller.stream.drain();
  _controller.close();
  closeConnection?.call(this);
}