ChatEventAction.fromJson constructor

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

Implementation

factory ChatEventAction.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case ChatEventMessageEdited.CONSTRUCTOR:
      return ChatEventMessageEdited.fromJson(json);
    case ChatEventMessageDeleted.CONSTRUCTOR:
      return ChatEventMessageDeleted.fromJson(json);
    case ChatEventMessagePinned.CONSTRUCTOR:
      return ChatEventMessagePinned.fromJson(json);
    case ChatEventMessageUnpinned.CONSTRUCTOR:
      return ChatEventMessageUnpinned.fromJson(json);
    case ChatEventPollStopped.CONSTRUCTOR:
      return ChatEventPollStopped.fromJson(json);
    case ChatEventMemberJoined.CONSTRUCTOR:
      return ChatEventMemberJoined.fromJson(json);
    case ChatEventMemberJoinedByInviteLink.CONSTRUCTOR:
      return ChatEventMemberJoinedByInviteLink.fromJson(json);
    case ChatEventMemberJoinedByRequest.CONSTRUCTOR:
      return ChatEventMemberJoinedByRequest.fromJson(json);
    case ChatEventMemberInvited.CONSTRUCTOR:
      return ChatEventMemberInvited.fromJson(json);
    case ChatEventMemberLeft.CONSTRUCTOR:
      return ChatEventMemberLeft.fromJson(json);
    case ChatEventMemberPromoted.CONSTRUCTOR:
      return ChatEventMemberPromoted.fromJson(json);
    case ChatEventMemberRestricted.CONSTRUCTOR:
      return ChatEventMemberRestricted.fromJson(json);
    case ChatEventAvailableReactionsChanged.CONSTRUCTOR:
      return ChatEventAvailableReactionsChanged.fromJson(json);
    case ChatEventDescriptionChanged.CONSTRUCTOR:
      return ChatEventDescriptionChanged.fromJson(json);
    case ChatEventLinkedChatChanged.CONSTRUCTOR:
      return ChatEventLinkedChatChanged.fromJson(json);
    case ChatEventLocationChanged.CONSTRUCTOR:
      return ChatEventLocationChanged.fromJson(json);
    case ChatEventMessageAutoDeleteTimeChanged.CONSTRUCTOR:
      return ChatEventMessageAutoDeleteTimeChanged.fromJson(json);
    case ChatEventPermissionsChanged.CONSTRUCTOR:
      return ChatEventPermissionsChanged.fromJson(json);
    case ChatEventPhotoChanged.CONSTRUCTOR:
      return ChatEventPhotoChanged.fromJson(json);
    case ChatEventSlowModeDelayChanged.CONSTRUCTOR:
      return ChatEventSlowModeDelayChanged.fromJson(json);
    case ChatEventStickerSetChanged.CONSTRUCTOR:
      return ChatEventStickerSetChanged.fromJson(json);
    case ChatEventTitleChanged.CONSTRUCTOR:
      return ChatEventTitleChanged.fromJson(json);
    case ChatEventUsernameChanged.CONSTRUCTOR:
      return ChatEventUsernameChanged.fromJson(json);
    case ChatEventActiveUsernamesChanged.CONSTRUCTOR:
      return ChatEventActiveUsernamesChanged.fromJson(json);
    case ChatEventHasProtectedContentToggled.CONSTRUCTOR:
      return ChatEventHasProtectedContentToggled.fromJson(json);
    case ChatEventInvitesToggled.CONSTRUCTOR:
      return ChatEventInvitesToggled.fromJson(json);
    case ChatEventIsAllHistoryAvailableToggled.CONSTRUCTOR:
      return ChatEventIsAllHistoryAvailableToggled.fromJson(json);
    case ChatEventHasAggressiveAntiSpamEnabledToggled.CONSTRUCTOR:
      return ChatEventHasAggressiveAntiSpamEnabledToggled.fromJson(json);
    case ChatEventSignMessagesToggled.CONSTRUCTOR:
      return ChatEventSignMessagesToggled.fromJson(json);
    case ChatEventInviteLinkEdited.CONSTRUCTOR:
      return ChatEventInviteLinkEdited.fromJson(json);
    case ChatEventInviteLinkRevoked.CONSTRUCTOR:
      return ChatEventInviteLinkRevoked.fromJson(json);
    case ChatEventInviteLinkDeleted.CONSTRUCTOR:
      return ChatEventInviteLinkDeleted.fromJson(json);
    case ChatEventVideoChatCreated.CONSTRUCTOR:
      return ChatEventVideoChatCreated.fromJson(json);
    case ChatEventVideoChatEnded.CONSTRUCTOR:
      return ChatEventVideoChatEnded.fromJson(json);
    case ChatEventVideoChatMuteNewParticipantsToggled.CONSTRUCTOR:
      return ChatEventVideoChatMuteNewParticipantsToggled.fromJson(json);
    case ChatEventVideoChatParticipantIsMutedToggled.CONSTRUCTOR:
      return ChatEventVideoChatParticipantIsMutedToggled.fromJson(json);
    case ChatEventVideoChatParticipantVolumeLevelChanged.CONSTRUCTOR:
      return ChatEventVideoChatParticipantVolumeLevelChanged.fromJson(json);
    case ChatEventIsForumToggled.CONSTRUCTOR:
      return ChatEventIsForumToggled.fromJson(json);
    case ChatEventForumTopicCreated.CONSTRUCTOR:
      return ChatEventForumTopicCreated.fromJson(json);
    case ChatEventForumTopicEdited.CONSTRUCTOR:
      return ChatEventForumTopicEdited.fromJson(json);
    case ChatEventForumTopicToggleIsClosed.CONSTRUCTOR:
      return ChatEventForumTopicToggleIsClosed.fromJson(json);
    case ChatEventForumTopicToggleIsHidden.CONSTRUCTOR:
      return ChatEventForumTopicToggleIsHidden.fromJson(json);
    case ChatEventForumTopicDeleted.CONSTRUCTOR:
      return ChatEventForumTopicDeleted.fromJson(json);
    case ChatEventForumTopicPinned.CONSTRUCTOR:
      return ChatEventForumTopicPinned.fromJson(json);
    default:
      return const ChatEventAction();
  }
}