close method
Close the sink and ensure all pending trace data is flushed to the target.
Implementation
@override
Future<void> close() async {
if (!_initialized) {
await _initCompleter.future;
}
final exitPort = ReceivePort();
_serializerPort.send(_TerminateSignal(exitPort.sendPort));
await exitPort.first;
_serializerIsolate.kill();
}