fromJson static method

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

Implementation

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

  return GiftAuctionAcquiredGift(
    receiverId: MessageSender.fromJson(tdMapFromJson(json['receiver_id'])),
    date: (json['date'] as int?) ?? 0,
    starCount: (json['star_count'] as int?) ?? 0,
    auctionRoundNumber: (json['auction_round_number'] as int?) ?? 0,
    auctionRoundPosition: (json['auction_round_position'] as int?) ?? 0,
    uniqueGiftNumber: (json['unique_gift_number'] as int?) ?? 0,
    text: FormattedText.fromJson(tdMapFromJson(json['text'])),
    isPrivate: (json['is_private'] as bool?) ?? false,
  );
}