GiveawayCompleted.fromJson constructor

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

Constructor from JSON data

Implementation

factory GiveawayCompleted.fromJson(Map<String, dynamic> json) {
  return GiveawayCompleted(
    winnerCount: json['winner_count'],
    unclaimedPrizeCount: json['unclaimed_prize_count'],
    giveawayMessage: json['giveaway_message'] != null
        ? Message.fromJson(json['giveaway_message'])
        : null,
    isStarGiveaway: json['is_star_giveaway'],
  );
}