close method
Shuts the sink down: no new entries are accepted, then onClose delivers the accepted ones and releases resources. A repeated call closes nothing again and returns the result of the first.
Implementation
@nonVirtual
Future<void> close() {
if (_closing case final closing?) return closing;
_isClosed = true;
return _closing = Future.sync(onClose);
}