mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
fix: store type
This commit is contained in:
@@ -39,3 +39,12 @@ String pathJoin(String path1, String path2) {
|
||||
bool isFileUrl(String url) => url.split('/').last.contains('.');
|
||||
|
||||
int get timeStamp => DateTime.now().millisecondsSinceEpoch;
|
||||
|
||||
bool isBaseType(Object? obj) {
|
||||
return obj is String ||
|
||||
obj is int ||
|
||||
obj is double ||
|
||||
obj is bool ||
|
||||
obj is List ||
|
||||
obj is Map;
|
||||
}
|
||||
|
||||
@@ -190,10 +190,9 @@ abstract final class ICloud {
|
||||
return;
|
||||
}
|
||||
|
||||
final dlFile = await File(await Paths.bak).readAsString();
|
||||
final dlBak = await Computer.shared.start(Backup.fromJsonString, dlFile);
|
||||
await dlBak.restore();
|
||||
|
||||
final dlFile = await File(await Paths.bak).readAsString();
|
||||
final dlBak = await Computer.shared.start(Backup.fromJsonString, dlFile);
|
||||
await dlBak.restore();
|
||||
|
||||
await backup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user