fromJson static method

PushMessageContentGiveaway? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static PushMessageContentGiveaway? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return PushMessageContentGiveaway(
    winnerCount: (json['winner_count'] as int?) ?? 0,
    prize: GiveawayPrize.fromJson(tdMapFromJson(json['prize'])),
    isPinned: (json['is_pinned'] as bool?) ?? false,
  );
}