fromJson static method

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

Implementation

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

  return StarPaymentOption(
    currency: (json['currency'] as String?) ?? '',
    amount: (json['amount'] as int?) ?? 0,
    starCount: (json['star_count'] as int?) ?? 0,
    storeProductId: (json['store_product_id'] as String?) ?? '',
    isAdditional: (json['is_additional'] as bool?) ?? false,
  );
}