fix: 登录,注册输入框光标问题修复
This commit is contained in:
parent
a78078e484
commit
0171b4c0a8
@ -62,7 +62,7 @@ class _LoginInputState extends State<LoginInput> {
|
|||||||
|
|
||||||
Widget androidView() {
|
Widget androidView() {
|
||||||
bool isPwd = widget.isPwd ?? false;
|
bool isPwd = widget.isPwd ?? false;
|
||||||
String pwd = (widget.controller?.text ?? '').replaceAll(RegExp(r'.'), '●');
|
// String pwd = (widget.controller?.text ?? '').replaceAll(RegExp(r'.'), '●');
|
||||||
return Container(
|
return Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(bottom: BorderSide(width: 0.5.h, color: Colors.grey)),
|
border: Border(bottom: BorderSide(width: 0.5.h, color: Colors.grey)),
|
||||||
@ -95,14 +95,10 @@ class _LoginInputState extends State<LoginInput> {
|
|||||||
inputFormatters: widget.inputFormatters,
|
inputFormatters: widget.inputFormatters,
|
||||||
textInputAction: TextInputAction.next,
|
textInputAction: TextInputAction.next,
|
||||||
keyboardType: isPwd ? TextInputType.emailAddress : null,
|
keyboardType: isPwd ? TextInputType.emailAddress : null,
|
||||||
style: isPwd
|
style: TextStyle(
|
||||||
? TextStyle(
|
|
||||||
fontSize: 22.sp,
|
fontSize: 22.sp,
|
||||||
color: Colors.transparent,
|
|
||||||
letterSpacing: 2.5,
|
letterSpacing: 2.5,
|
||||||
fontFamily: 'Monospace',
|
),
|
||||||
)
|
|
||||||
: null,
|
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
//输入里面输入文字内边距设置
|
//输入里面输入文字内边距设置
|
||||||
contentPadding: const EdgeInsets.only(
|
contentPadding: const EdgeInsets.only(
|
||||||
@ -122,20 +118,20 @@ class _LoginInputState extends State<LoginInput> {
|
|||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (isPwd)
|
// if (isPwd)
|
||||||
Padding(
|
// Padding(
|
||||||
padding: EdgeInsets.only(
|
// padding: EdgeInsets.only(
|
||||||
top: F.sw(skyCall: () => 27.h, xhjCall: () => widget.isLogin! ? 27.h : 39.h)),
|
// top: F.sw(skyCall: () => 27.h, xhjCall: () => widget.isLogin! ? 27.h : 39.h)),
|
||||||
child: Text(
|
// child: Text(
|
||||||
pwd,
|
// pwd,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: 22.sp,
|
// fontSize: 22.sp,
|
||||||
color: AppColors.darkGrayTextColor,
|
// color: AppColors.darkGrayTextColor,
|
||||||
letterSpacing: 2.0,
|
// letterSpacing: 2.0,
|
||||||
fontFamily: 'Monospace',
|
// fontFamily: 'Monospace',
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user