fromMap static method

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

Construct from Map.

Implementation

static UpdateFileDownload? 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 file_id = _map['file_id']! as int;
  var complete_date = _map['complete_date']! as int;
  var is_paused = _map['is_paused']! as bool;
  var counts = DownloadedFileCounts.fromMap(_map['counts'])!;
  return UpdateFileDownload(
    extra: extra,
    clientId: clientId,
    file_id: file_id,
    complete_date: complete_date,
    is_paused: is_paused,
    counts: counts,
  );
}