sink property
The currently used IOSink.
Implementation
Future<IOSink> get sink async {
if (_sink == null) {
// open the file's sink for writing in append mode
_sink = (await file).openWrite(mode: FileMode.append);
// since this file will contain a list of json objects, write a '['
_sink!.write('[\n');
_initialized = true;
}
return _sink!;
}