fromJson static method

DVStoreListing fromJson(
  1. Map<String, Object?> json
)

Implementation

static DVStoreListing fromJson(Map<String, Object?> json) => DVStoreListing(
      storeProductId: json['storeProductId']! as String,
      title: (json['title'] as String?) ?? '',
      description: (json['description'] as String?) ?? '',
      displayPrice: (json['displayPrice'] as String?) ?? '',
      price: dvMoneyFromJson(json['price']),
      period: json['period'] as String?,
      offers: <DVStoreOffer>[
        for (final Object? offer
            in (json['offers'] as List<Object?>?) ?? const <Object?>[])
          DVStoreOffer.fromJson(
              (offer! as Map<Object?, Object?>).cast<String, Object?>()),
      ],
    );