feat:调整登录密码输入框的密码样式

This commit is contained in:
liyi 2025-03-11 15:47:05 +08:00
parent 982a41cffe
commit ee5772da02

View File

@ -28,7 +28,7 @@ class LoginInput extends StatefulWidget {
BlockStrCallback? onchangeAction;
BlockStrCallback? onSubmitted;
BlockClickCallback? onTapAction;
bool? isLogin;// false
bool? isLogin; // false
LoginInput({
Key? key,
@ -94,19 +94,16 @@ class _LoginInputState extends State<LoginInput> {
autofocus: false,
inputFormatters: widget.inputFormatters,
textInputAction: TextInputAction.next,
keyboardType: isPwd ? TextInputType.emailAddress : null,
style: isPwd
? TextStyle(
fontSize: 22.sp,
color: Colors.transparent,
letterSpacing: 2.5,
fontFamily: 'Monospace',
)
: null,
//
keyboardType: isPwd
? TextInputType.visiblePassword
: TextInputType.emailAddress,
//
obscureText: isPwd,
decoration: InputDecoration(
//
contentPadding: const EdgeInsets.only(
top: 8.0, right: -10.0, bottom: 8.0),
// contentPadding: const EdgeInsets.only(
// top: 8.0, right: -10.0, bottom: 8.0),
labelText: widget.label,
labelStyle: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
@ -122,20 +119,6 @@ class _LoginInputState extends State<LoginInput> {
: null,
),
),
if (isPwd)
Padding(
padding: EdgeInsets.only(
top: F.sw(skyCall: () => 27.h, xhjCall: () => widget.isLogin! ? 27.h : 39.h)),
child: Text(
pwd,
style: TextStyle(
fontSize: 22.sp,
color: AppColors.darkGrayTextColor,
letterSpacing: 2.0,
fontFamily: 'Monospace',
),
),
),
],
),
),