fromMap static method

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

Construct from Map.

Implementation

static InputInlineQueryResult? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'inputInlineQueryResultAnimation':
      return InputInlineQueryResultAnimation.fromMap(_map);
    case 'inputInlineQueryResultVenue':
      return InputInlineQueryResultVenue.fromMap(_map);
    case 'inputInlineQueryResultSticker':
      return InputInlineQueryResultSticker.fromMap(_map);
    case 'inputInlineQueryResultGame':
      return InputInlineQueryResultGame.fromMap(_map);
    case 'inputInlineQueryResultVideo':
      return InputInlineQueryResultVideo.fromMap(_map);
    case 'inputInlineQueryResultContact':
      return InputInlineQueryResultContact.fromMap(_map);
    case 'inputInlineQueryResultArticle':
      return InputInlineQueryResultArticle.fromMap(_map);
    case 'inputInlineQueryResultAudio':
      return InputInlineQueryResultAudio.fromMap(_map);
    case 'inputInlineQueryResultPhoto':
      return InputInlineQueryResultPhoto.fromMap(_map);
    case 'inputInlineQueryResultLocation':
      return InputInlineQueryResultLocation.fromMap(_map);
    case 'inputInlineQueryResultDocument':
      return InputInlineQueryResultDocument.fromMap(_map);
    case 'inputInlineQueryResultVoiceNote':
      return InputInlineQueryResultVoiceNote.fromMap(_map);
    case null:
    default:
      return null;
  }
}