fix: loadingState cast

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-01 13:59:02 +08:00
parent 62a1768307
commit 43977c737b
4 changed files with 26 additions and 20 deletions

View File

@@ -179,9 +179,11 @@ class HistoryController extends MultiSelectController {
TextButton(
onPressed: () async {
Get.back();
_onDelete(((loadingState.value as Success).response as List)
.where((e) => e.checked)
.toList());
if (loadingState.value is Success) {
_onDelete(((loadingState.value as Success).response as List)
.where((e) => e.checked)
.toList());
}
},
child: const Text('确认'),
)