back to home/ alert pop safety

This commit is contained in:
csf
2022-03-13 23:07:52 +08:00
parent 2247147b7b
commit 5aba802c80
6 changed files with 52 additions and 56 deletions

View File

@@ -104,7 +104,7 @@ class FileModel extends ChangeNotifier {
} else {
_currentRemoteDir = fileDir;
}
notifyListeners();
notifyListeners(); // TODO use too early, error occur:setState() or markNeedsBuild() called during build.
} catch (e) {
debugPrint("Failed to tryUpdateDir :$fd");
}
@@ -156,7 +156,8 @@ class FileModel extends ChangeNotifier {
}
items.items.forEach((entry) {
_jobId++;
if (entry.isFile) { // TODO dir
if (entry.isFile) {
// TODO dir
final msg = {
"id": _jobId.toString(),
"path": entry.path,
@@ -170,9 +171,7 @@ class FileModel extends ChangeNotifier {
});
}
createDir(String path){
}
createDir(String path) {}
changeSortStyle(SortBy sort) {
_sortStyle = sort;