mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Add eta support
This commit is contained in:
@@ -78,8 +78,8 @@ class TaskDownloadSingleProgress {
|
||||
final DateTime started;
|
||||
final int downloaded;
|
||||
final double speed;
|
||||
@JsonKey(name: 'last_updated')
|
||||
final int lastUpdated;
|
||||
@JsonKey(name: 'last_updated', fromJson: _fromJson, toJson: _toJson)
|
||||
final DateTime lastUpdated;
|
||||
static DateTime _fromJson(int d) =>
|
||||
DateTime.fromMillisecondsSinceEpoch(d, isUtc: true);
|
||||
static int _toJson(DateTime d) => d.millisecondsSinceEpoch;
|
||||
|
||||
Reference in New Issue
Block a user