FrameResource.fromJson constructor

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

Implementation

factory FrameResource.fromJson(Map<String, dynamic> json) {
  return FrameResource(
    url: json['url'] as String,
    type: network.ResourceType.fromJson(json['type'] as String),
    mimeType: json['mimeType'] as String,
    lastModified:
        json.containsKey('lastModified')
            ? network.TimeSinceEpoch.fromJson(json['lastModified'] as num)
            : null,
    contentSize:
        json.containsKey('contentSize') ? json['contentSize'] as num : null,
    failed: json.containsKey('failed') ? json['failed'] as bool : null,
    canceled: json.containsKey('canceled') ? json['canceled'] as bool : null,
  );
}