startChunkedConversion method
Start a chunked conversion.
Only one object can be passed into the returned sink.
The argument sink
will receive byte lists in sizes depending on the
bufferSize
passed to the constructor when creating this encoder.
Implementation
@override
ChunkedConversionSink<Object> startChunkedConversion(Sink<List<int>?> sink) {
ByteConversionSink byteSink;
if (sink is ByteConversionSink) {
byteSink = sink;
} else {
byteSink = ByteConversionSink.from(sink as Sink<List<int>>);
}
return _JsonUtf8EncoderSink(byteSink, _toEncodable, _indent, _bufferSize);
}