PurchaseInput.fromJson constructor
PurchaseInput.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PurchaseInput.fromJson(Map<String, dynamic> json) {
return PurchaseInput(
id: json['id'] as String,
ids: (json['ids'] as List<dynamic>?) == null ? null : (json['ids'] as List<dynamic>?)!.map((e) => e as String).toList(),
isAutoRenewing: json['isAutoRenewing'] as bool,
platform: IapPlatform.fromJson(json['platform'] as String),
productId: json['productId'] as String,
purchaseState: PurchaseState.fromJson(json['purchaseState'] as String),
purchaseToken: json['purchaseToken'] as String?,
quantity: json['quantity'] as int,
transactionDate: (json['transactionDate'] as num).toDouble(),
);
}