PremiumLimitType.fromJson constructor

PremiumLimitType.fromJson(
  1. Map<String, dynamic> json
)

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();
  }
}