fromMap static method

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

Construct from Map.

Implementation

static SearchMessagesFilter? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'searchMessagesFilterUnreadReaction':
      return SearchMessagesFilterUnreadReaction.fromMap(_map);
    case 'searchMessagesFilterAudio':
      return SearchMessagesFilterAudio.fromMap(_map);
    case 'searchMessagesFilterFailedToSend':
      return SearchMessagesFilterFailedToSend.fromMap(_map);
    case 'searchMessagesFilterVoiceAndVideoNote':
      return SearchMessagesFilterVoiceAndVideoNote.fromMap(_map);
    case 'searchMessagesFilterChatPhoto':
      return SearchMessagesFilterChatPhoto.fromMap(_map);
    case 'searchMessagesFilterAnimation':
      return SearchMessagesFilterAnimation.fromMap(_map);
    case 'searchMessagesFilterVoiceNote':
      return SearchMessagesFilterVoiceNote.fromMap(_map);
    case 'searchMessagesFilterDocument':
      return SearchMessagesFilterDocument.fromMap(_map);
    case 'searchMessagesFilterPhotoAndVideo':
      return SearchMessagesFilterPhotoAndVideo.fromMap(_map);
    case 'searchMessagesFilterUnreadMention':
      return SearchMessagesFilterUnreadMention.fromMap(_map);
    case 'searchMessagesFilterPinned':
      return SearchMessagesFilterPinned.fromMap(_map);
    case 'searchMessagesFilterMention':
      return SearchMessagesFilterMention.fromMap(_map);
    case 'searchMessagesFilterEmpty':
      return SearchMessagesFilterEmpty.fromMap(_map);
    case 'searchMessagesFilterVideoNote':
      return SearchMessagesFilterVideoNote.fromMap(_map);
    case 'searchMessagesFilterUrl':
      return SearchMessagesFilterUrl.fromMap(_map);
    case 'searchMessagesFilterVideo':
      return SearchMessagesFilterVideo.fromMap(_map);
    case 'searchMessagesFilterPhoto':
      return SearchMessagesFilterPhoto.fromMap(_map);
    case null:
    default:
      return null;
  }
}