UserDataModel.fromJson constructor
UserDataModel.fromJson(
- Map<String, dynamic> json
)
Implementation
UserDataModel.fromJson(Map<String, dynamic> json) {
sId = json['_id'];
contestId = json['contest_id'];
challengeId = json['challenge_id'];
userId = json['user_id'];
clientId = json['client_id'];
if (json['milestones_data'] != null) {
milestonesData = <MilestonesData>[];
json['milestones_data'].forEach((v) {
milestonesData!.add(MilestonesData.fromJson(v));
});
}
eventAttribute = json['event_attribute'];
iV = json['__v'];
}