Timeline.fromJson constructor Null safety

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

Creates a timeline given JSON-encoded timeline data.

json is in the chrome://tracing format. It can be saved to a file and loaded in Chrome for visual inspection.

See https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

Implementation

factory Timeline.fromJson(Map<String, dynamic> json) {
  return Timeline._(json, _parseEvents(json));
}