fromMap static method

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

Construct from Map.

Implementation

static DownloadedFileCounts? 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 active_count = _map['active_count']! as int;
  var paused_count = _map['paused_count']! as int;
  var completed_count = _map['completed_count']! as int;
  return DownloadedFileCounts(
    extra: extra,
    clientId: clientId,
    active_count: active_count,
    paused_count: paused_count,
    completed_count: completed_count,
  );
}