loadProgramInfoFromJson function Null safety

ProgramInfo loadProgramInfoFromJson(
  1. Object json,
  2. {bool collapseAnonymousClosures = false}
)

Implementation

ProgramInfo loadProgramInfoFromJson(Object json,
    {bool collapseAnonymousClosures = false}) {
  if (v8_profile.Snapshot.isV8HeapSnapshot(json)) {
    return v8_profile.toProgramInfo(
        v8_profile.Snapshot.fromJson(json as Map<String, dynamic>),
        collapseAnonymousClosures: collapseAnonymousClosures);
  } else {
    return instruction_sizes.loadProgramInfo(json as List<dynamic>,
        collapseAnonymousClosures: collapseAnonymousClosures);
  }
}