♻️ Refactored the captcha

This commit is contained in:
2025-11-09 14:21:33 +08:00
parent 4927795260
commit f254cfa81e
6 changed files with 28 additions and 20 deletions

View File

@@ -104,9 +104,7 @@ class CheckInWidget extends HookConsumerWidget {
} catch (err) {
if (err is DioException) {
if (err.response?.statusCode == 423 && context.mounted) {
final captchaTk = await Navigator.of(
context,
).push(MaterialPageRoute(builder: (context) => CaptchaScreen()));
final captchaTk = await CaptchaScreen.show(context);
if (captchaTk == null) return;
return await checkIn(captchatTk: captchaTk);
}