DurationInformation.fromJson constructor Null safety

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

Implementation

DurationInformation.fromJson(Map<String, dynamic> json) {
  large = json['Large'] != null ? Large.fromJson(json['Large']) : null;
  mid = json['Mid'] != null ? Large.fromJson(json['Mid']) : null;
  marathon =
  json['Marathon'] != null ? Large.fromJson(json['Marathon']) : null;
  fast = json['Fast'] != null ? Large.fromJson(json['Fast']) : null;
}