PremiumLimitType.fromJson constructor
a PremiumLimitType return type can be :
- PremiumLimitTypeSupergroupCount
- PremiumLimitTypePinnedChatCount
- PremiumLimitTypeCreatedPublicChatCount
- PremiumLimitTypeSavedAnimationCount
- PremiumLimitTypeFavoriteStickerCount
- PremiumLimitTypeChatFolderCount
- PremiumLimitTypeChatFolderChosenChatCount
- PremiumLimitTypePinnedArchivedChatCount
- PremiumLimitTypeCaptionLength
- PremiumLimitTypeBioLength
- PremiumLimitTypeChatFolderInviteLinkCount
- PremiumLimitTypeShareableChatFolderCount
- PremiumLimitTypeActiveStoryCount
Implementation
factory PremiumLimitType.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case PremiumLimitTypeSupergroupCount.CONSTRUCTOR:
return PremiumLimitTypeSupergroupCount.fromJson(json);
case PremiumLimitTypePinnedChatCount.CONSTRUCTOR:
return PremiumLimitTypePinnedChatCount.fromJson(json);
case PremiumLimitTypeCreatedPublicChatCount.CONSTRUCTOR:
return PremiumLimitTypeCreatedPublicChatCount.fromJson(json);
case PremiumLimitTypeSavedAnimationCount.CONSTRUCTOR:
return PremiumLimitTypeSavedAnimationCount.fromJson(json);
case PremiumLimitTypeFavoriteStickerCount.CONSTRUCTOR:
return PremiumLimitTypeFavoriteStickerCount.fromJson(json);
case PremiumLimitTypeChatFolderCount.CONSTRUCTOR:
return PremiumLimitTypeChatFolderCount.fromJson(json);
case PremiumLimitTypeChatFolderChosenChatCount.CONSTRUCTOR:
return PremiumLimitTypeChatFolderChosenChatCount.fromJson(json);
case PremiumLimitTypePinnedArchivedChatCount.CONSTRUCTOR:
return PremiumLimitTypePinnedArchivedChatCount.fromJson(json);
case PremiumLimitTypeCaptionLength.CONSTRUCTOR:
return PremiumLimitTypeCaptionLength.fromJson(json);
case PremiumLimitTypeBioLength.CONSTRUCTOR:
return PremiumLimitTypeBioLength.fromJson(json);
case PremiumLimitTypeChatFolderInviteLinkCount.CONSTRUCTOR:
return PremiumLimitTypeChatFolderInviteLinkCount.fromJson(json);
case PremiumLimitTypeShareableChatFolderCount.CONSTRUCTOR:
return PremiumLimitTypeShareableChatFolderCount.fromJson(json);
case PremiumLimitTypeActiveStoryCount.CONSTRUCTOR:
return PremiumLimitTypeActiveStoryCount.fromJson(json);
default:
return const PremiumLimitType();
}
}