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) {
|
Widget _buildResendButton(bool canResend, RegisterState state) {
|
||||||
final borderColor = canResend ? AppColors.primary : AppColors.slate300;
|
|
||||||
final textColor = canResend ? AppColors.primary : AppColors.slate400;
|
final textColor = canResend ? AppColors.primary : AppColors.slate400;
|
||||||
|
|
||||||
String text;
|
String text;
|
||||||
if (state.status == FormzSubmissionStatus.inProgress) {
|
if (state.status == FormzSubmissionStatus.inProgress) {
|
||||||
text = '发送中...';
|
text = '发送中';
|
||||||
} else if (canResend) {
|
} else if (canResend) {
|
||||||
text = '重新发送';
|
text = '重发';
|
||||||
} else {
|
} else {
|
||||||
text = '$_countdown s';
|
text = '${_countdown}s';
|
||||||
}
|
}
|
||||||
|
|
||||||
return SizedBox(
|
return GestureDetector(
|
||||||
width: 90,
|
onTap: canResend ? _handleResendCode : null,
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
child: Container(
|
||||||
height: 40,
|
height: 40,
|
||||||
child: OutlinedButton(
|
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||||
onPressed: canResend ? _handleResendCode : null,
|
alignment: Alignment.center,
|
||||||
style: OutlinedButton.styleFrom(
|
|
||||||
backgroundColor: AppColors.background,
|
|
||||||
side: BorderSide(color: borderColor),
|
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
|
||||||
),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
text,
|
text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: textColor,
|
color: textColor,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user