MyAchievements.fromJson constructor
MyAchievements.fromJson(
- Map<String, dynamic> json
)
Implementation
factory MyAchievements.fromJson(Map<String, dynamic> json) {
return MyAchievements(
speeding: json['speeding'] != null
? AchievementProgress.fromJson(json['speeding'])
: null,
drowsy: json['drowsy'] != null
? AchievementProgress.fromJson(json['drowsy'])
: null,
hardBraking: json['hardBraking'] != null
? AchievementProgress.fromJson(json['hardBraking'])
: null,
hardAcceleration: json['hardAcceleration'] != null
? AchievementProgress.fromJson(json['hardAcceleration'])
: null,
hardTurn: json['hardTurn'] != null
? AchievementProgress.fromJson(json['hardTurn'])
: null,
overall: json['overall'] != null
? AchievementProgress.fromJson(json['overall'])
: null,
after10pm: json['after10pm'] != null
? AchievementProgress.fromJson(json['after10pm'])
: null,
longTrips: json['longTrips'] != null
? AchievementProgress.fromJson(json['longTrips'])
: null,
referral: json['referral'] != null
? AchievementProgress.fromJson(json['referral'])
: null,
);
}