close method
Flush all pending data from the underlying IOSink, and close it. Returns a future that completes when the flush and close are finished. Calling this method more than once has no effect. See also done.
Implementation
@override
Future<void> close() {
_lastClose ??= Future(() async {
await flush();
return _dest.close();
});
return _lastClose!;
}