Aria2cResult.fromJson constructor
Aria2cResult.fromJson(
- Map json
Implementation
factory Aria2cResult.fromJson(Map json) {
Map result = {};
// 只保存非ID和GID的数据
json.forEach((key, value) {
if (key != 'id' && key != 'gid') {
result[key] = value;
}
});
return Aria2cResult(json['id'], json['result'] ?? '', result);
}