🐛 Fix compability issue on web platform

This commit is contained in:
2025-05-16 22:48:23 +08:00
parent a9da4b4f4f
commit 1e10ca626b
26 changed files with 989 additions and 251 deletions

View File

@ -47,6 +47,7 @@ class CreateAccountScreen extends HookConsumerWidget {
if (!context.mounted) return;
try {
showLoadingModal(context);
final client = ref.watch(apiClientProvider);
await client.post(
'/accounts',
@ -59,10 +60,11 @@ class CreateAccountScreen extends HookConsumerWidget {
'captcha_token': captchaTk,
},
);
if (!context.mounted) return;
hideLoadingModal(context);
showPostCreateModal();
} catch (err) {
if (context.mounted) hideLoadingModal(context);
showErrorAlert(err);
}
}