PreloadingAttemptKey.fromJson constructor

PreloadingAttemptKey.fromJson(
  1. 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,
    targetHint: json.containsKey('targetHint')
        ? SpeculationTargetHint.fromJson(json['targetHint'] as String)
        : null,
  );
}