fromJson static method
Implementation
static ChatRevenueTransaction? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return ChatRevenueTransaction(
cryptocurrency: (json['cryptocurrency'] as String?) ?? '',
cryptocurrencyAmount: (json['cryptocurrency_amount'] is int
? json['cryptocurrency_amount'] as int
: int.tryParse(
json['cryptocurrency_amount']?.toString() ?? '')) ??
0,
type: ChatRevenueTransactionType.fromJson(
json['type'] as Map<String, dynamic>?)!,
);
}