Writer.fromSink constructor
Creates a new writer that writes to the provided sink
.
The onFlush
callback is invoked when the writer is flushed, which may
be useful for a sink that needs to know when data is requested to be
written to the underlying sink.
This API exists as an adapter for Dart's core Sink interface. Prefer using a Writer directly if possible.
Implementation
factory Writer.fromSink(
Sink<List<int>> sink, {
Future<void> Function()? onFlush,
}) = _SinkWriter;