Data.fromMap constructor
Implementation
factory Data.fromMap(Map<String, dynamic> json) => Data(
id: json["_id"],
name: json["name"],
clientId: json["clientId"],
gameId: json["gameId"],
challengeType: json["challengeType"],
rewardCriteria: json["rewardCriteria"],
description: json["description"],
status: json["status"],
props: Props.fromMap(json["props"]),
tasks: List<TaskElement>.from(
json["tasks"].map((x) => TaskElement.fromMap(x))),
createdAt: DateTime.parse(json["createdAt"]),
updatedAt: DateTime.parse(json["updatedAt"]),
v: json["__v"],
);