fromJson static method

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

Implementation

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

  return GiftOnChainSaleTransactionFragment(
    nftAddress: (json['nft_address'] as String?) ?? '',
    payload: (json['payload'] as String?) ?? '',
    gramAmount: (json['gram_amount'] is int
            ? json['gram_amount'] as int
            : int.tryParse(json['gram_amount']?.toString() ?? '')) ??
        0,
    isGaslessTransferAvailable:
        (json['is_gasless_transfer_available'] as bool?) ?? false,
  );
}