TracingCompleteEvent.fromJson constructor Null safety

TracingCompleteEvent.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory TracingCompleteEvent.fromJson(Map<String, dynamic> json) {
  return TracingCompleteEvent(
    dataLossOccurred: json['dataLossOccurred'] as bool,
    stream: json.containsKey('stream')
        ? io.StreamHandle.fromJson(json['stream'] as String)
        : null,
    traceFormat: json.containsKey('traceFormat')
        ? StreamFormat.fromJson(json['traceFormat'] as String)
        : null,
    streamCompression: json.containsKey('streamCompression')
        ? StreamCompression.fromJson(json['streamCompression'] as String)
        : null,
  );
}