fromJson static method

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

Implementation

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

  return TonWalletTransactionTypeTelegramGiftSale(
    nft: TonNft.fromJson(json['nft'] as Map<String, dynamic>?),
    amount: (json['amount'] is int
            ? json['amount'] as int
            : int.tryParse(json['amount']?.toString() ?? '')) ??
        0,
  );
}