style(auth): simplify resend button to text link style

This commit is contained in:
qzl
2026-02-26 11:53:06 +08:00
parent d6113416c6
commit 76620cde6f
@@ -260,32 +260,28 @@ class _RegisterVerificationViewState extends State<RegisterVerificationView> {
}
Widget _buildResendButton(bool canResend, RegisterState state) {
final borderColor = canResend ? AppColors.primary : AppColors.slate300;
final textColor = canResend ? AppColors.primary : AppColors.slate400;
String text;
if (state.status == FormzSubmissionStatus.inProgress) {
text = '发送中...';
text = '发送中';
} else if (canResend) {
text = '新发送';
text = '';
} else {
text = '$_countdown s';
text = '${_countdown}s';
}
return SizedBox(
width: 90,
return GestureDetector(
onTap: canResend ? _handleResendCode : null,
behavior: HitTestBehavior.opaque,
child: Container(
height: 40,
child: OutlinedButton(
onPressed: canResend ? _handleResendCode : null,
style: OutlinedButton.styleFrom(
backgroundColor: AppColors.background,
side: BorderSide(color: borderColor),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
padding: const EdgeInsets.symmetric(horizontal: 12),
alignment: Alignment.center,
child: Text(
text,
style: TextStyle(
fontSize: 13,
fontSize: 14,
fontWeight: FontWeight.w500,
color: textColor,
),