SearchMessagesFilter.fromJson constructor

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

Implementation

factory SearchMessagesFilter.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case SearchMessagesFilterEmpty.CONSTRUCTOR:
      return SearchMessagesFilterEmpty.fromJson(json);
    case SearchMessagesFilterAnimation.CONSTRUCTOR:
      return SearchMessagesFilterAnimation.fromJson(json);
    case SearchMessagesFilterAudio.CONSTRUCTOR:
      return SearchMessagesFilterAudio.fromJson(json);
    case SearchMessagesFilterDocument.CONSTRUCTOR:
      return SearchMessagesFilterDocument.fromJson(json);
    case SearchMessagesFilterPhoto.CONSTRUCTOR:
      return SearchMessagesFilterPhoto.fromJson(json);
    case SearchMessagesFilterVideo.CONSTRUCTOR:
      return SearchMessagesFilterVideo.fromJson(json);
    case SearchMessagesFilterVoiceNote.CONSTRUCTOR:
      return SearchMessagesFilterVoiceNote.fromJson(json);
    case SearchMessagesFilterPhotoAndVideo.CONSTRUCTOR:
      return SearchMessagesFilterPhotoAndVideo.fromJson(json);
    case SearchMessagesFilterUrl.CONSTRUCTOR:
      return SearchMessagesFilterUrl.fromJson(json);
    case SearchMessagesFilterChatPhoto.CONSTRUCTOR:
      return SearchMessagesFilterChatPhoto.fromJson(json);
    case SearchMessagesFilterVideoNote.CONSTRUCTOR:
      return SearchMessagesFilterVideoNote.fromJson(json);
    case SearchMessagesFilterVoiceAndVideoNote.CONSTRUCTOR:
      return SearchMessagesFilterVoiceAndVideoNote.fromJson(json);
    case SearchMessagesFilterMention.CONSTRUCTOR:
      return SearchMessagesFilterMention.fromJson(json);
    case SearchMessagesFilterUnreadMention.CONSTRUCTOR:
      return SearchMessagesFilterUnreadMention.fromJson(json);
    case SearchMessagesFilterUnreadReaction.CONSTRUCTOR:
      return SearchMessagesFilterUnreadReaction.fromJson(json);
    case SearchMessagesFilterFailedToSend.CONSTRUCTOR:
      return SearchMessagesFilterFailedToSend.fromJson(json);
    case SearchMessagesFilterPinned.CONSTRUCTOR:
      return SearchMessagesFilterPinned.fromJson(json);
    default:
      return const SearchMessagesFilter();
  }
}