PurchaseProduct.fromJson constructor
Implementation
factory PurchaseProduct.fromJson(Map<String, Object?> json) =>
PurchaseProduct(
kind: PurchaseKind.fromWire(json['kind'] as String),
item: json['item'] as String,
plan: json['plan'] == null
? null
: PurchasePlan.fromWire(json['plan'] as String),
amount: (json['amount'] as num?)?.toInt(),
name: json['name'] as String,
description: json['description'] as String,
price: json['price'] as String,
freeTrialDays: (json['freeTrialDays'] as num?)?.toInt(),
appStore: json['appStore'] as String?,
googlePlay: PurchaseProductGooglePlay.fromJson(
(json['googlePlay'] as Map).cast<String, Object?>(),
),
);