fromMap static method

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

Construct from Map.

Implementation

static SearchChatMessages? 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 query = _map['query']! as String;
  var sender_id = MessageSender.fromMap(_map['sender_id']);
  var from_message_id = _map['from_message_id']! as int;
  var offset = _map['offset']! as int;
  var limit = _map['limit']! as int;
  var filter = SearchMessagesFilter.fromMap(_map['filter']);
  var message_thread_id = _map['message_thread_id']! as int;
  return SearchChatMessages(
    extra: extra,
    clientId: clientId,
    chat_id: chat_id,
    query: query,
    sender_id: sender_id,
    from_message_id: from_message_id,
    offset: offset,
    limit: limit,
    filter: filter,
    message_thread_id: message_thread_id,
  );
}