fromMap static method

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

Construct from Map.

Implementation

static SearchFileDownloads? 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 query = _map['query']! as String;
  var only_active = _map['only_active']! as bool;
  var only_completed = _map['only_completed']! as bool;
  var offset = _map['offset']! as String;
  var limit = _map['limit']! as int;
  return SearchFileDownloads(
    extra: extra,
    clientId: clientId,
    query: query,
    only_active: only_active,
    only_completed: only_completed,
    offset: offset,
    limit: limit,
  );
}