fromMap static method

Update? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static Update? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'updateFile':
      return UpdateFile.fromMap(_map);
    case 'updateNotificationGroup':
      return UpdateNotificationGroup.fromMap(_map);
    case 'updateFileGenerationStop':
      return UpdateFileGenerationStop.fromMap(_map);
    case 'updateMessageSendAcknowledged':
      return UpdateMessageSendAcknowledged.fromMap(_map);
    case 'updateMessageUnreadReactions':
      return UpdateMessageUnreadReactions.fromMap(_map);
    case 'updateStorySendSucceeded':
      return UpdateStorySendSucceeded.fromMap(_map);
    case 'updateNewInlineCallbackQuery':
      return UpdateNewInlineCallbackQuery.fromMap(_map);
    case 'updateNewInlineQuery':
      return UpdateNewInlineQuery.fromMap(_map);
    case 'updateChatMember':
      return UpdateChatMember.fromMap(_map);
    case 'updateScopeNotificationSettings':
      return UpdateScopeNotificationSettings.fromMap(_map);
    case 'updateUserPrivacySettingRules':
      return UpdateUserPrivacySettingRules.fromMap(_map);
    case 'updateSupergroupFullInfo':
      return UpdateSupergroupFullInfo.fromMap(_map);
    case 'updateServiceNotification':
      return UpdateServiceNotification.fromMap(_map);
    case 'updateActiveNotifications':
      return UpdateActiveNotifications.fromMap(_map);
    case 'updateStory':
      return UpdateStory.fromMap(_map);
    case 'updateTermsOfService':
      return UpdateTermsOfService.fromMap(_map);
    case 'updateChatHasProtectedContent':
      return UpdateChatHasProtectedContent.fromMap(_map);
    case 'updateMessageEdited':
      return UpdateMessageEdited.fromMap(_map);
    case 'updateOption':
      return UpdateOption.fromMap(_map);
    case 'updateChatReadInbox':
      return UpdateChatReadInbox.fromMap(_map);
    case 'updateHavePendingNotifications':
      return UpdateHavePendingNotifications.fromMap(_map);
    case 'updateChatActiveStories':
      return UpdateChatActiveStories.fromMap(_map);
    case 'updateInstalledStickerSets':
      return UpdateInstalledStickerSets.fromMap(_map);
    case 'updateAnimationSearchParameters':
      return UpdateAnimationSearchParameters.fromMap(_map);
    case 'updateChatMessageSender':
      return UpdateChatMessageSender.fromMap(_map);
    case 'updateChatLastMessage':
      return UpdateChatLastMessage.fromMap(_map);
    case 'updateFileGenerationStart':
      return UpdateFileGenerationStart.fromMap(_map);
    case 'updateChatUnreadMentionCount':
      return UpdateChatUnreadMentionCount.fromMap(_map);
    case 'updateChatFolders':
      return UpdateChatFolders.fromMap(_map);
    case 'updateChatHasScheduledMessages':
      return UpdateChatHasScheduledMessages.fromMap(_map);
    case 'updateDiceEmojis':
      return UpdateDiceEmojis.fromMap(_map);
    case 'updateAnimatedEmojiMessageClicked':
      return UpdateAnimatedEmojiMessageClicked.fromMap(_map);
    case 'updateRecentStickers':
      return UpdateRecentStickers.fromMap(_map);
    case 'updateAuthorizationState':
      return UpdateAuthorizationState.fromMap(_map);
    case 'updateSuggestedActions':
      return UpdateSuggestedActions.fromMap(_map);
    case 'updateBasicGroupFullInfo':
      return UpdateBasicGroupFullInfo.fromMap(_map);
    case 'updateSavedAnimations':
      return UpdateSavedAnimations.fromMap(_map);
    case 'updateUserStatus':
      return UpdateUserStatus.fromMap(_map);
    case 'updateSavedNotificationSounds':
      return UpdateSavedNotificationSounds.fromMap(_map);
    case 'updateAutosaveSettings':
      return UpdateAutosaveSettings.fromMap(_map);
    case 'updateUnconfirmedSession':
      return UpdateUnconfirmedSession.fromMap(_map);
    case 'updateChatIsTranslatable':
      return UpdateChatIsTranslatable.fromMap(_map);
    case 'updateFileDownload':
      return UpdateFileDownload.fromMap(_map);
    case 'updateConnectionState':
      return UpdateConnectionState.fromMap(_map);
    case 'updateChatPhoto':
      return UpdateChatPhoto.fromMap(_map);
    case 'updateFileDownloads':
      return UpdateFileDownloads.fromMap(_map);
    case 'updateChatPosition':
      return UpdateChatPosition.fromMap(_map);
    case 'updateNewShippingQuery':
      return UpdateNewShippingQuery.fromMap(_map);
    case 'updateGroupCallParticipant':
      return UpdateGroupCallParticipant.fromMap(_map);
    case 'updateChatDefaultDisableNotification':
      return UpdateChatDefaultDisableNotification.fromMap(_map);
    case 'updateMessageContentOpened':
      return UpdateMessageContentOpened.fromMap(_map);
    case 'updateWebAppMessageSent':
      return UpdateWebAppMessageSent.fromMap(_map);
    case 'updatePollAnswer':
      return UpdatePollAnswer.fromMap(_map);
    case 'updateChatReadOutbox':
      return UpdateChatReadOutbox.fromMap(_map);
    case 'updateTrendingStickerSets':
      return UpdateTrendingStickerSets.fromMap(_map);
    case 'updateMessageSendSucceeded':
      return UpdateMessageSendSucceeded.fromMap(_map);
    case 'updateStickerSet':
      return UpdateStickerSet.fromMap(_map);
    case 'updateGroupCall':
      return UpdateGroupCall.fromMap(_map);
    case 'updateSelectedBackground':
      return UpdateSelectedBackground.fromMap(_map);
    case 'updateChatPermissions':
      return UpdateChatPermissions.fromMap(_map);
    case 'updateStoryStealthMode':
      return UpdateStoryStealthMode.fromMap(_map);
    case 'updateChatThemes':
      return UpdateChatThemes.fromMap(_map);
    case 'updateUsersNearby':
      return UpdateUsersNearby.fromMap(_map);
    case 'updateStoryListChatCount':
      return UpdateStoryListChatCount.fromMap(_map);
    case 'updateChatActionBar':
      return UpdateChatActionBar.fromMap(_map);
    case 'updateMessageMentionRead':
      return UpdateMessageMentionRead.fromMap(_map);
    case 'updateNewCallbackQuery':
      return UpdateNewCallbackQuery.fromMap(_map);
    case 'updateStoryDeleted':
      return UpdateStoryDeleted.fromMap(_map);
    case 'updateNewCallSignalingData':
      return UpdateNewCallSignalingData.fromMap(_map);
    case 'updateNewPreCheckoutQuery':
      return UpdateNewPreCheckoutQuery.fromMap(_map);
    case 'updateUnreadChatCount':
      return UpdateUnreadChatCount.fromMap(_map);
    case 'updateLanguagePackStrings':
      return UpdateLanguagePackStrings.fromMap(_map);
    case 'updateUserFullInfo':
      return UpdateUserFullInfo.fromMap(_map);
    case 'updateChatNotificationSettings':
      return UpdateChatNotificationSettings.fromMap(_map);
    case 'updateMessageInteractionInfo':
      return UpdateMessageInteractionInfo.fromMap(_map);
    case 'updatePoll':
      return UpdatePoll.fromMap(_map);
    case 'updateMessageIsPinned':
      return UpdateMessageIsPinned.fromMap(_map);
    case 'updateCall':
      return UpdateCall.fromMap(_map);
    case 'updateMessageContent':
      return UpdateMessageContent.fromMap(_map);
    case 'updateAttachmentMenuBots':
      return UpdateAttachmentMenuBots.fromMap(_map);
    case 'updateChatAction':
      return UpdateChatAction.fromMap(_map);
    case 'updateNewCustomEvent':
      return UpdateNewCustomEvent.fromMap(_map);
    case 'updateActiveEmojiReactions':
      return UpdateActiveEmojiReactions.fromMap(_map);
    case 'updateSupergroup':
      return UpdateSupergroup.fromMap(_map);
    case 'updateNewChat':
      return UpdateNewChat.fromMap(_map);
    case 'updateChatTitle':
      return UpdateChatTitle.fromMap(_map);
    case 'updateNewCustomQuery':
      return UpdateNewCustomQuery.fromMap(_map);
    case 'updateChatIsMarkedAsUnread':
      return UpdateChatIsMarkedAsUnread.fromMap(_map);
    case 'updateChatTheme':
      return UpdateChatTheme.fromMap(_map);
    case 'updateForumTopicInfo':
      return UpdateForumTopicInfo.fromMap(_map);
    case 'updateNotification':
      return UpdateNotification.fromMap(_map);
    case 'updateChatReplyMarkup':
      return UpdateChatReplyMarkup.fromMap(_map);
    case 'updateChatBlockList':
      return UpdateChatBlockList.fromMap(_map);
    case 'updateFavoriteStickers':
      return UpdateFavoriteStickers.fromMap(_map);
    case 'updateDefaultReactionType':
      return UpdateDefaultReactionType.fromMap(_map);
    case 'updateMessageLiveLocationViewed':
      return UpdateMessageLiveLocationViewed.fromMap(_map);
    case 'updateChatAvailableReactions':
      return UpdateChatAvailableReactions.fromMap(_map);
    case 'updateAddChatMembersPrivacyForbidden':
      return UpdateAddChatMembersPrivacyForbidden.fromMap(_map);
    case 'updateDeleteMessages':
      return UpdateDeleteMessages.fromMap(_map);
    case 'updateNewMessage':
      return UpdateNewMessage.fromMap(_map);
    case 'updateSecretChat':
      return UpdateSecretChat.fromMap(_map);
    case 'updateFileRemovedFromDownloads':
      return UpdateFileRemovedFromDownloads.fromMap(_map);
    case 'updateChatOnlineMemberCount':
      return UpdateChatOnlineMemberCount.fromMap(_map);
    case 'updateChatUnreadReactionCount':
      return UpdateChatUnreadReactionCount.fromMap(_map);
    case 'updateMessageSendFailed':
      return UpdateMessageSendFailed.fromMap(_map);
    case 'updateUser':
      return UpdateUser.fromMap(_map);
    case 'updateUnreadMessageCount':
      return UpdateUnreadMessageCount.fromMap(_map);
    case 'updateChatMessageAutoDeleteTime':
      return UpdateChatMessageAutoDeleteTime.fromMap(_map);
    case 'updateFileAddedToDownloads':
      return UpdateFileAddedToDownloads.fromMap(_map);
    case 'updateBasicGroup':
      return UpdateBasicGroup.fromMap(_map);
    case 'updateChatVideoChat':
      return UpdateChatVideoChat.fromMap(_map);
    case 'updateNewChatJoinRequest':
      return UpdateNewChatJoinRequest.fromMap(_map);
    case 'updateStorySendFailed':
      return UpdateStorySendFailed.fromMap(_map);
    case 'updateChatPendingJoinRequests':
      return UpdateChatPendingJoinRequests.fromMap(_map);
    case 'updateChatBackground':
      return UpdateChatBackground.fromMap(_map);
    case 'updateChatDraftMessage':
      return UpdateChatDraftMessage.fromMap(_map);
    case 'updateNewChosenInlineResult':
      return UpdateNewChosenInlineResult.fromMap(_map);
    case null:
    default:
      return null;
  }
}