opt.: show loading dialog

This commit is contained in:
lollipopkit🏳️‍⚧️
2024-07-22 23:33:21 +08:00
parent 7a359588db
commit 41ec46f1d3
8 changed files with 86 additions and 80 deletions

View File

@@ -430,10 +430,9 @@ final class _PvePageState extends State<PvePage> {
],
);
if (sure != true) return;
bool? suc;
await context.showLoadingDialog(fn: () async {
suc = await func(item.node, item.id);
});
final suc =
await context.showLoadingDialog(fn: () => func(item.node, item.id));
if (suc == true) {
context.showSnackBar(l10n.success);
} else {