fromJson static method

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

Implementation

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

  return TonWalletTransactionTypeTransfer(
    amount: (json['amount'] is int
            ? json['amount'] as int
            : int.tryParse(json['amount']?.toString() ?? '')) ??
        0,
    isGasless: (json['is_gasless'] as bool?) ?? false,
    comment: (json['comment'] as String?) ?? '',
    isCommentEncrypted: (json['is_comment_encrypted'] as bool?) ?? false,
  );
}