fix:回滚输入框改动

This commit is contained in:
liyi 2025-04-02 09:32:40 +08:00
parent 9f43b3e7c1
commit 3f022ed878

View File

@ -93,17 +93,20 @@ class _LoginInputState extends State<LoginInput> {
onTap: widget.onTapAction,
autofocus: false,
inputFormatters: widget.inputFormatters,
textInputAction: isPwd ? TextInputAction.done : TextInputAction.next,
//
keyboardType: isPwd
? TextInputType.visiblePassword
: TextInputType.emailAddress,
//
obscureText: isPwd,
textInputAction: TextInputAction.next,
keyboardType: isPwd ? TextInputType.emailAddress : null,
style: isPwd
? TextStyle(
fontSize: 22.sp,
color: Colors.transparent,
letterSpacing: 2.5,
fontFamily: 'Monospace',
)
: null,
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),
@ -119,6 +122,20 @@ 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',
),
),
),
],
),
),