fromJson static method

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

Implementation

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

  return LinkPreviewTypeGiftAuction(
    gift: Gift.fromJson(tdMapFromJson(json['gift'])),
    auctionEndDate: (json['auction_end_date'] as int?) ?? 0,
  );
}