fromJson static method

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

Implementation

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

  return UpgradedGiftOriginOnChainResale(
    gramAmount: (json['gram_amount'] is int
            ? json['gram_amount'] as int
            : int.tryParse(json['gram_amount']?.toString() ?? '')) ??
        0,
  );
}