QuizReward.fromJson constructor

QuizReward.fromJson(
  1. Map<String, dynamic> json
)

Implementation

QuizReward.fromJson(Map<String, dynamic> json) {
  rewardId = json['reward_id'];
  type = json['type'];
  delivery = json['delivery'] != null
      ? DeliveryReward.fromJson(json['delivery'])
      : null;
  prob = json['prob'];
  amount = json['amount'];
  score = json['score'];
  condition = json['condition'];
  coupon = json['coupon'] != null ? Coupon.fromJson(json['coupon']) : null;
}