FrameResourceTree.fromJson constructor

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

Implementation

factory FrameResourceTree.fromJson(Map<String, dynamic> json) {
  return FrameResourceTree(
    frame: FrameInfo.fromJson(json['frame'] as Map<String, dynamic>),
    childFrames: json.containsKey('childFrames')
        ? (json['childFrames'] as List)
            .map((e) => FrameResourceTree.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    resources: (json['resources'] as List)
        .map((e) => FrameResource.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}