fromMap static method

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

Construct from Map.

Implementation

static SendInlineQueryResultMessage? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var chat_id = _map['chat_id']! as int;
  var message_thread_id = _map['message_thread_id']! as int;
  var reply_to = MessageReplyTo.fromMap(_map['reply_to']);
  var options = MessageSendOptions.fromMap(_map['options']);
  var query_id = _map['query_id']! as int64;
  var result_id = _map['result_id']! as String;
  var hide_via_bot = _map['hide_via_bot']! as bool;
  return SendInlineQueryResultMessage(
    extra: extra,
    clientId: clientId,
    chat_id: chat_id,
    message_thread_id: message_thread_id,
    reply_to: reply_to,
    options: options,
    query_id: query_id,
    result_id: result_id,
    hide_via_bot: hide_via_bot,
  );
}