close method
Close the sink and ensure all pending trace data is flushed to the target.
Implementation
@override
Future<void> close() async {
_buffer.write('\n]\n');
final bytes = utf8.encode(_buffer.toString());
final compressed = GZipEncoder().encode(bytes);
_file.writeAsBytesSync(compressed);
}