Giveaway.fromJson constructor

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

Constructor from JSON data

Implementation

factory Giveaway.fromJson(Map<String, dynamic> json) {
  return Giveaway(
    chats:
        (json['chats'] as List).map((item) => Chat.fromJson(item)).toList(),
    winnersSelectionDate: json['winners_selection_date'],
    winnerCount: json['winner_count'],
    onlyNewMembers: json['only_new_members'],
    hasPublicWinners: json['has_public_winners'],
    prizeDescription: json['prize_description'],
    countryCodes: json['country_codes']?.cast<String>(),
    premiumSubscriptionMonthCount: json['premium_subscription_month_count'],
    prizeStarCount: json['prize_star_count'],
  );
}