fromJson static method

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

Implementation

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

  return ChatRevenueTransactions(
    gramAmount: (json['gram_amount'] as int?) ?? 0,
    transactions: List<ChatRevenueTransaction>.from(
      tdListFromJson(json['transactions'])
          .map((item) => ChatRevenueTransaction.fromJson(tdMapFromJson(item)))
          .whereType<ChatRevenueTransaction>(),
    ),
    nextOffset: (json['next_offset'] as String?) ?? '',
  );
}