feat: persist fast transfer sessions

This commit is contained in:
ngfchl
2026-07-18 11:46:31 +08:00
parent ae7206346e
commit b46a09c3ee
3 changed files with 43 additions and 0 deletions
+10
View File
@@ -22,6 +22,16 @@ class FastTransferEntry {
if (md5 != null) 'etag': md5,
if (gcid != null) 'gcid': gcid,
};
factory FastTransferEntry.fromJson(Map<String, dynamic> value) =>
FastTransferEntry(
path: value['path']?.toString() ?? '',
size: value['size'] is int
? value['size'] as int
: int.tryParse('${value['size']}') ?? 0,
md5: value['etag']?.toString(),
gcid: value['gcid']?.toString(),
);
}
List<FastTransferEntry> parseFastTransferJSON(String text) {