PreloadingAttemptKey.fromJson constructor
PreloadingAttemptKey.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PreloadingAttemptKey.fromJson(Map<String, dynamic> json) {
return PreloadingAttemptKey(
loaderId: network.LoaderId.fromJson(json['loaderId'] as String),
action: SpeculationAction.fromJson(json['action'] as String),
url: json['url'] as String,
formSubmission: json.containsKey('formSubmission')
? json['formSubmission'] as bool
: null,
targetHint: json.containsKey('targetHint')
? SpeculationTargetHint.fromJson(json['targetHint'] as String)
: null,
);
}