maybeMap<TResult extends Object?> method

TResult maybeMap<TResult extends Object?>({
  1. TResult activeStoryCount(
    1. PremiumLimitTypeActiveStoryCount value
    )?,
  2. TResult bioLength(
    1. PremiumLimitTypeBioLength value
    )?,
  3. TResult captionLength(
    1. PremiumLimitTypeCaptionLength value
    )?,
  4. TResult chatFolderChosenChatCount(
    1. PremiumLimitTypeChatFolderChosenChatCount value
    )?,
  5. TResult chatFolderCount(
    1. PremiumLimitTypeChatFolderCount value
    )?,
  6. TResult chatFolderInviteLinkCount(
    1. PremiumLimitTypeChatFolderInviteLinkCount value
    )?,
  7. TResult createdPublicChatCount(
    1. PremiumLimitTypeCreatedPublicChatCount value
    )?,
  8. TResult customTextCompositionStyleCount(
    1. PremiumLimitTypeCustomTextCompositionStyleCount value
    )?,
  9. TResult favoriteStickerCount(
    1. PremiumLimitTypeFavoriteStickerCount value
    )?,
  10. TResult messageTextLength(
    1. PremiumLimitTypeMessageTextLength value
    )?,
  11. TResult monthlyPostedStoryCount(
    1. PremiumLimitTypeMonthlyPostedStoryCount value
    )?,
  12. TResult ownedBotCount(
    1. PremiumLimitTypeOwnedBotCount value
    )?,
  13. TResult pinnedArchivedChatCount(
    1. PremiumLimitTypePinnedArchivedChatCount value
    )?,
  14. TResult pinnedChatCount(
    1. PremiumLimitTypePinnedChatCount value
    )?,
  15. TResult pinnedSavedMessagesTopicCount(
    1. PremiumLimitTypePinnedSavedMessagesTopicCount value
    )?,
  16. TResult savedAnimationCount(
    1. PremiumLimitTypeSavedAnimationCount value
    )?,
  17. TResult shareableChatFolderCount(
    1. PremiumLimitTypeShareableChatFolderCount value
    )?,
  18. TResult similarChatCount(
    1. PremiumLimitTypeSimilarChatCount value
    )?,
  19. TResult storyCaptionLength(
    1. PremiumLimitTypeStoryCaptionLength value
    )?,
  20. TResult storySuggestedReactionAreaCount(
    1. PremiumLimitTypeStorySuggestedReactionAreaCount value
    )?,
  21. TResult supergroupCount(
    1. PremiumLimitTypeSupergroupCount value
    )?,
  22. TResult weeklyPostedStoryCount(
    1. PremiumLimitTypeWeeklyPostedStoryCount value
    )?,
  23. required TResult orElse(),
})

Implementation

TResult maybeMap<TResult extends Object?>({
  TResult Function(PremiumLimitTypeActiveStoryCount value)? activeStoryCount,
  TResult Function(PremiumLimitTypeBioLength value)? bioLength,
  TResult Function(PremiumLimitTypeCaptionLength value)? captionLength,
  TResult Function(PremiumLimitTypeChatFolderChosenChatCount value)?
  chatFolderChosenChatCount,
  TResult Function(PremiumLimitTypeChatFolderCount value)? chatFolderCount,
  TResult Function(PremiumLimitTypeChatFolderInviteLinkCount value)?
  chatFolderInviteLinkCount,
  TResult Function(PremiumLimitTypeCreatedPublicChatCount value)?
  createdPublicChatCount,
  TResult Function(PremiumLimitTypeCustomTextCompositionStyleCount value)?
  customTextCompositionStyleCount,
  TResult Function(PremiumLimitTypeFavoriteStickerCount value)?
  favoriteStickerCount,
  TResult Function(PremiumLimitTypeMessageTextLength value)?
  messageTextLength,
  TResult Function(PremiumLimitTypeMonthlyPostedStoryCount value)?
  monthlyPostedStoryCount,
  TResult Function(PremiumLimitTypeOwnedBotCount value)? ownedBotCount,
  TResult Function(PremiumLimitTypePinnedArchivedChatCount value)?
  pinnedArchivedChatCount,
  TResult Function(PremiumLimitTypePinnedChatCount value)? pinnedChatCount,
  TResult Function(PremiumLimitTypePinnedSavedMessagesTopicCount value)?
  pinnedSavedMessagesTopicCount,
  TResult Function(PremiumLimitTypeSavedAnimationCount value)?
  savedAnimationCount,
  TResult Function(PremiumLimitTypeShareableChatFolderCount value)?
  shareableChatFolderCount,
  TResult Function(PremiumLimitTypeSimilarChatCount value)? similarChatCount,
  TResult Function(PremiumLimitTypeStoryCaptionLength value)?
  storyCaptionLength,
  TResult Function(PremiumLimitTypeStorySuggestedReactionAreaCount value)?
  storySuggestedReactionAreaCount,
  TResult Function(PremiumLimitTypeSupergroupCount value)? supergroupCount,
  TResult Function(PremiumLimitTypeWeeklyPostedStoryCount value)?
  weeklyPostedStoryCount,
  required TResult Function() orElse,
}) {
  switch (getConstructor()) {
    case PremiumLimitTypeActiveStoryCount.constructor:
      if (activeStoryCount != null) {
        return activeStoryCount.call(
          this as PremiumLimitTypeActiveStoryCount,
        );
      }
      break;
    case PremiumLimitTypeBioLength.constructor:
      if (bioLength != null) {
        return bioLength.call(this as PremiumLimitTypeBioLength);
      }
      break;
    case PremiumLimitTypeCaptionLength.constructor:
      if (captionLength != null) {
        return captionLength.call(this as PremiumLimitTypeCaptionLength);
      }
      break;
    case PremiumLimitTypeChatFolderChosenChatCount.constructor:
      if (chatFolderChosenChatCount != null) {
        return chatFolderChosenChatCount.call(
          this as PremiumLimitTypeChatFolderChosenChatCount,
        );
      }
      break;
    case PremiumLimitTypeChatFolderCount.constructor:
      if (chatFolderCount != null) {
        return chatFolderCount.call(this as PremiumLimitTypeChatFolderCount);
      }
      break;
    case PremiumLimitTypeChatFolderInviteLinkCount.constructor:
      if (chatFolderInviteLinkCount != null) {
        return chatFolderInviteLinkCount.call(
          this as PremiumLimitTypeChatFolderInviteLinkCount,
        );
      }
      break;
    case PremiumLimitTypeCreatedPublicChatCount.constructor:
      if (createdPublicChatCount != null) {
        return createdPublicChatCount.call(
          this as PremiumLimitTypeCreatedPublicChatCount,
        );
      }
      break;
    case PremiumLimitTypeCustomTextCompositionStyleCount.constructor:
      if (customTextCompositionStyleCount != null) {
        return customTextCompositionStyleCount.call(
          this as PremiumLimitTypeCustomTextCompositionStyleCount,
        );
      }
      break;
    case PremiumLimitTypeFavoriteStickerCount.constructor:
      if (favoriteStickerCount != null) {
        return favoriteStickerCount.call(
          this as PremiumLimitTypeFavoriteStickerCount,
        );
      }
      break;
    case PremiumLimitTypeMessageTextLength.constructor:
      if (messageTextLength != null) {
        return messageTextLength.call(
          this as PremiumLimitTypeMessageTextLength,
        );
      }
      break;
    case PremiumLimitTypeMonthlyPostedStoryCount.constructor:
      if (monthlyPostedStoryCount != null) {
        return monthlyPostedStoryCount.call(
          this as PremiumLimitTypeMonthlyPostedStoryCount,
        );
      }
      break;
    case PremiumLimitTypeOwnedBotCount.constructor:
      if (ownedBotCount != null) {
        return ownedBotCount.call(this as PremiumLimitTypeOwnedBotCount);
      }
      break;
    case PremiumLimitTypePinnedArchivedChatCount.constructor:
      if (pinnedArchivedChatCount != null) {
        return pinnedArchivedChatCount.call(
          this as PremiumLimitTypePinnedArchivedChatCount,
        );
      }
      break;
    case PremiumLimitTypePinnedChatCount.constructor:
      if (pinnedChatCount != null) {
        return pinnedChatCount.call(this as PremiumLimitTypePinnedChatCount);
      }
      break;
    case PremiumLimitTypePinnedSavedMessagesTopicCount.constructor:
      if (pinnedSavedMessagesTopicCount != null) {
        return pinnedSavedMessagesTopicCount.call(
          this as PremiumLimitTypePinnedSavedMessagesTopicCount,
        );
      }
      break;
    case PremiumLimitTypeSavedAnimationCount.constructor:
      if (savedAnimationCount != null) {
        return savedAnimationCount.call(
          this as PremiumLimitTypeSavedAnimationCount,
        );
      }
      break;
    case PremiumLimitTypeShareableChatFolderCount.constructor:
      if (shareableChatFolderCount != null) {
        return shareableChatFolderCount.call(
          this as PremiumLimitTypeShareableChatFolderCount,
        );
      }
      break;
    case PremiumLimitTypeSimilarChatCount.constructor:
      if (similarChatCount != null) {
        return similarChatCount.call(
          this as PremiumLimitTypeSimilarChatCount,
        );
      }
      break;
    case PremiumLimitTypeStoryCaptionLength.constructor:
      if (storyCaptionLength != null) {
        return storyCaptionLength.call(
          this as PremiumLimitTypeStoryCaptionLength,
        );
      }
      break;
    case PremiumLimitTypeStorySuggestedReactionAreaCount.constructor:
      if (storySuggestedReactionAreaCount != null) {
        return storySuggestedReactionAreaCount.call(
          this as PremiumLimitTypeStorySuggestedReactionAreaCount,
        );
      }
      break;
    case PremiumLimitTypeSupergroupCount.constructor:
      if (supergroupCount != null) {
        return supergroupCount.call(this as PremiumLimitTypeSupergroupCount);
      }
      break;
    case PremiumLimitTypeWeeklyPostedStoryCount.constructor:
      if (weeklyPostedStoryCount != null) {
        return weeklyPostedStoryCount.call(
          this as PremiumLimitTypeWeeklyPostedStoryCount,
        );
      }
      break;
  }
  return orElse.call();
}