LoadingFailedEvent.fromJson constructor
LoadingFailedEvent.fromJson(
- Map<String, dynamic> json
)
Implementation
factory LoadingFailedEvent.fromJson(Map<String, dynamic> json) {
return LoadingFailedEvent(
requestId: RequestId.fromJson(json['requestId'] as String),
timestamp: MonotonicTime.fromJson(json['timestamp'] as num),
type: ResourceType.fromJson(json['type'] as String),
errorText: json['errorText'] as String,
canceled: json.containsKey('canceled') ? json['canceled'] as bool : null,
blockedReason: json.containsKey('blockedReason')
? BlockedReason.fromJson(json['blockedReason'] as String)
: null,
corsErrorStatus: json.containsKey('corsErrorStatus')
? CorsErrorStatus.fromJson(
json['corsErrorStatus'] as Map<String, dynamic>)
: null,
);
}