fix(auth): improve resendCode with status tracking and return value

This commit is contained in:
qzl
2026-02-26 11:12:04 +08:00
parent d1e224ece4
commit 8235ac5cd9
3 changed files with 76 additions and 7 deletions
@@ -94,9 +94,9 @@ class _RegisterVerificationViewState extends State<RegisterVerificationView> {
Future<void> _handleResendCode() async {
final cubit = context.read<RegisterCubit>();
await cubit.resendCode();
final success = await cubit.resendCode();
if (cubit.state.codeSent && mounted) {
if (success && mounted) {
_startCountdown();
}
}