Task.fromJson constructor
Implementation
factory Task.fromJson(Map<String, dynamic> json) => Task(
title: json["title"],
event: json["event"],
frequency: json["frequency"],
conditions: json["conditions"],
referrerRewards: json["referrerRewards"] == null
? []
: List<ReferreReward>.from(
json["referrerRewards"]!.map((x) => ReferreReward.fromJson(x))),
referreeRewards: json["referreeRewards"] == null
? []
: List<ReferreReward>.from(
json["referreeRewards"]!.map((x) => ReferreReward.fromJson(x))),
id: json["_id"],
);