$SkuDetailsEntityFromJson function
Implementation
SkuDetailsEntity $SkuDetailsEntityFromJson(Map<String, dynamic> json) {
final SkuDetailsEntity skuDetailsEntity = SkuDetailsEntity();
final String? productId = jsonConvert.convert<String>(json['productId']);
if (productId != null) {
skuDetailsEntity.productId = productId;
}
final String? type = jsonConvert.convert<String>(json['type']);
if (type != null) {
skuDetailsEntity.type = type;
}
final String? title = jsonConvert.convert<String>(json['title']);
if (title != null) {
skuDetailsEntity.title = title;
}
final String? name = jsonConvert.convert<String>(json['name']);
if (name != null) {
skuDetailsEntity.name = name;
}
final String? description = jsonConvert.convert<String>(json['description']);
if (description != null) {
skuDetailsEntity.description = description;
}
final String? price = jsonConvert.convert<String>(json['price']);
if (price != null) {
skuDetailsEntity.price = price;
}
final int? priceAmountMicros = jsonConvert.convert<int>(json['price_amount_micros']);
if (priceAmountMicros != null) {
skuDetailsEntity.priceAmountMicros = priceAmountMicros;
}
final String? priceCurrencyCode = jsonConvert.convert<String>(json['price_currency_code']);
if (priceCurrencyCode != null) {
skuDetailsEntity.priceCurrencyCode = priceCurrencyCode;
}
final String? subscriptionPeriod = jsonConvert.convert<String>(json['subscriptionPeriod']);
if (subscriptionPeriod != null) {
skuDetailsEntity.subscriptionPeriod = subscriptionPeriod;
}
final String? freeTrialPeriod = jsonConvert.convert<String>(json['freeTrialPeriod']);
if (freeTrialPeriod != null) {
skuDetailsEntity.freeTrialPeriod = freeTrialPeriod;
}
final String? skuDetailsToken = jsonConvert.convert<String>(json['skuDetailsToken']);
if (skuDetailsToken != null) {
skuDetailsEntity.skuDetailsToken = skuDetailsToken;
}
return skuDetailsEntity;
}