Advertisement
Guest User

model.dart

a guest
Oct 26th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.50 KB | None | 0 0
  1. class HomeTeam {
  2.   final int id, legacyId, name, countryId;
  3.   final bool nationalTeam;
  4.   final String logoPath;
  5.  
  6.     HomeTeam({this.id, this.legacyId, this.name, this.countryId, this.nationalTeam, this.logoPath});
  7.  
  8.     factory HomeTeam.fromJson(Map<String, dynamic> json){
  9.       return HomeTeam(
  10.           id: json['id'],
  11.           legacyId: json['legacy_id'],
  12.           name: json['name'],
  13.           nationalTeam: json['national_team'],
  14.           logoPath: json['logo_path']
  15.         );
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement