fromJson static method
Inherited by: StorePaymentPurposeGiftedStars StorePaymentPurposePremiumGift StorePaymentPurposePremiumGiftCodes StorePaymentPurposePremiumGiveaway StorePaymentPurposePremiumSubscription StorePaymentPurposeStarGiveaway StorePaymentPurposeStars
Implementation
static StorePaymentPurpose? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
switch (json['@type']) {
case StorePaymentPurposeGiftedStars.constructor:
return StorePaymentPurposeGiftedStars.fromJson(json);
case StorePaymentPurposePremiumGift.constructor:
return StorePaymentPurposePremiumGift.fromJson(json);
case StorePaymentPurposePremiumGiftCodes.constructor:
return StorePaymentPurposePremiumGiftCodes.fromJson(json);
case StorePaymentPurposePremiumGiveaway.constructor:
return StorePaymentPurposePremiumGiveaway.fromJson(json);
case StorePaymentPurposePremiumSubscription.constructor:
return StorePaymentPurposePremiumSubscription.fromJson(json);
case StorePaymentPurposeStarGiveaway.constructor:
return StorePaymentPurposeStarGiveaway.fromJson(json);
case StorePaymentPurposeStars.constructor:
return StorePaymentPurposeStars.fromJson(json);
default:
return null;
}
}