DownloadValue.fromJson constructor
DownloadValue.fromJson(
- Map json
Implementation
factory DownloadValue.fromJson(Map<dynamic, dynamic> json) {
return DownloadValue(
downloadStatus: json['downloadStatus'] as String,
quanlity: int.parse((json['quanlity'] ?? 0).toString()),
duration: int.parse(json['duration']),
size: int.parse(json['size']),
downloadSize: int.parse(json['downloadSize']),
progress: double.parse(json['progress']),
playPath: json['playPath'] as String,
isStop: json['isStop'] == "true",
url: json['url'] as String,
fileId: json['fileId'] as String,
error: json['error'] as String,
);
}