StorePaymentPurpose.fromJson constructor
a StorePaymentPurpose return type can be :
Implementation
factory StorePaymentPurpose.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case StorePaymentPurposePremiumSubscription.CONSTRUCTOR:
return StorePaymentPurposePremiumSubscription.fromJson(json);
case StorePaymentPurposeGiftedPremium.CONSTRUCTOR:
return StorePaymentPurposeGiftedPremium.fromJson(json);
default:
return const StorePaymentPurpose();
}
}