Challenges.fromJson constructor
Challenges.fromJson(
- Map<String, dynamic> json
)
Implementation
Challenges.fromJson(Map<String, dynamic> json) {
image = json['image'];
name = json['name'];
description = json['description'];
event = json['event'];
eventAttribute = json['event_attribute'];
variableValue = json['variable_value'].toString();
if (json['milestones'] != null) {
milestones = <Milestones>[];
json['milestones'].forEach((v) {
milestones!.add(Milestones.fromJson(v));
});
}
sId = json['_id'];
}