fromJson static method

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

Implementation

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

  return TonWalletTransactionTypeOnRampDeposit(
    amount: (json['amount'] is int
            ? json['amount'] as int
            : int.tryParse(json['amount']?.toString() ?? '')) ??
        0,
    providerName: (json['provider_name'] as String?) ?? '',
  );
}