TeamRating.fromMap constructor Null safety

TeamRating.fromMap(
  1. Map<String, dynamic> json
)

Decodes TeamRating object from json map

Implementation

factory TeamRating.fromMap(Map<String, dynamic> json) => TeamRating(
      idTeam: json['idteam'] == null ? null : json['idteam'],
      idRelease: json['idrelease'] == null ? null : json['idrelease'],
      rating: json['rating'] == null ? null : json['rating'],
      ratingPosition:
          json['rating_position'] == null ? null : json['rating_position'],
      date: json['date'] == null ? null : DateTime.parse(json['date']),
      techRating: json['tech_rating'] == null ? null : json['tech_rating'],
      formula: json['formula'] == null ? null : json['formula'],
    );