fromMap static method

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

Construct from Map.

Implementation

static UpdateNewInlineQuery? 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 id = _map['id']! as int64;
  var sender_user_id = _map['sender_user_id']! as int;
  var user_location = Location.fromMap(_map['user_location']);
  var chat_type = ChatType.fromMap(_map['chat_type']);
  var query = _map['query']! as String;
  var offset = _map['offset']! as String;
  return UpdateNewInlineQuery(
    extra: extra,
    clientId: clientId,
    id: id,
    sender_user_id: sender_user_id,
    user_location: user_location,
    chat_type: chat_type,
    query: query,
    offset: offset,
  );
}