ResponseReward.fromJson constructor
ResponseReward.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ResponseReward.fromJson(Map<String, dynamic> json) => ResponseReward(
id: json["id"],
uid: json["uid"],
rewardQty: json["reward_qty"],
rewardId: json["reward_id"],
taskId: json["task_id"],
rewardType: json["reward_type"],
delivery: Delivery.fromJson(json["delivery"]),
usedCount: json["used_count"],
note: json["note"],
status: json["status"],
updatedAt: DateTime.parse(json["updated_at"]),
createdAt: DateTime.parse(json["created_at"]),
couponCode: json["coupon_code"],
rewardName: json["reward_name"],
expiryText: json["expiry_text"],
expiryAt: json["expiry_at"] == null
? null
: DateTime.parse(json["expiry_at"]),
);