Team.fromMap constructor

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

Decodes Team object from json map

Implementation

factory Team.fromMap(Map<String, dynamic> json) => Team(
      idTeam: json['idteam'] == null ? '-1' : json['idteam'],
      name: json['name'] == null ? null : json['name'],
      town: json['town'] == null ? null : json['town'],
      regionName: json['region_name'] == null ? null : json['region_name'],
      countryName: json['country_name'] == null ? null : json['country_name'],
      tournamentsThisSeason: json['tournaments_this_season'] == null
          ? null
          : json['tournaments_this_season'],
      tournamentsTotal: json['tournaments_total'] == null
          ? null
          : json['tournaments_total'],
      comment: json['comment'] == null ? null : json['comment'],
    );