fromJson static method

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

Implementation

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

  return StorePaymentPurposeStars(
    currency: (json['currency'] as String?) ?? '',
    amount: (json['amount'] as int?) ?? 0,
    starCount: (json['star_count'] as int?) ?? 0,
    chatId: (json['chat_id'] as int?) ?? 0,
  );
}