fromMap static method
override
Construct from Map.
Implementation
static LocalFile? 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 path = _map['path']! as String;
var can_be_downloaded = _map['can_be_downloaded']! as bool;
var can_be_deleted = _map['can_be_deleted']! as bool;
var is_downloading_active = _map['is_downloading_active']! as bool;
var is_downloading_completed = _map['is_downloading_completed']! as bool;
var download_offset = _map['download_offset']! as int;
var downloaded_prefix_size = _map['downloaded_prefix_size']! as int;
var downloaded_size = _map['downloaded_size']! as int;
return LocalFile(
extra: extra,
clientId: clientId,
path: path,
can_be_downloaded: can_be_downloaded,
can_be_deleted: can_be_deleted,
is_downloading_active: is_downloading_active,
is_downloading_completed: is_downloading_completed,
download_offset: download_offset,
downloaded_prefix_size: downloaded_prefix_size,
downloaded_size: downloaded_size,
);
}