style(auth): simplify resend button to text link style
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user