GiveawayWinners.fromJson constructor

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

Constructor from JSON data

Implementation

factory GiveawayWinners.fromJson(Map<String, dynamic> json) {
  return GiveawayWinners(
    chat: Chat.fromJson(json['chat']),
    giveawayMessageId: json['giveaway_message_id'],
    winnersSelectionDate: json['winners_selection_date'],
    winnerCount: json['winner_count'],
    winners:
        (json['winners'] as List).map((item) => User.fromJson(item)).toList(),
    additionalChatCount: json['additional_chat_count'],
    premiumSubscriptionMonthCount: json['premium_subscription_month_count'],
    unclaimedPrizeCount: json['unclaimed_prize_count'],
    onlyNewMembers: json['only_new_members'],
    wasRefunded: json['was_refunded'],
    prizeDescription: json['prize_description'],
    prizeStarCount: json['prize_star_count'],
  );
}