feat: support start and pause all tasks (#121)

This commit is contained in:
Li Wei authored and GitHub committed 2023-06-09 22:15:59 +08:00
1 parent 0e3ca912a7
commit eb9d966855
13 files changed
+141 -1

No files matched your search

@@ -5,4 +5,5 @@ class CreateController extends GetxController {
final RxList fileInfos = [].obs;
final RxList selectedIndexes = [].obs;
final RxList openedFolders = [].obs;
final isResolving = false.obs;
}
@@ -115,9 +115,10 @@ class CreateView extends GetView<CreateController> {
}
Future<void> _doResolve() async {
if (_confirmController.currentState == ButtonState.loading) {
if (controller.isResolving.value) {
return;
}
controller.isResolving.value = true;
try {
_confirmController.start();
if (_resolveFormKey.currentState!.validate()) {
@@ -130,6 +131,7 @@ class CreateView extends GetView<CreateController> {
showErrorMessage(e);
} finally {
_confirmController.reset();
controller.isResolving.value = false;
}
}