优化红米手机登录时密码光标问题
This commit is contained in:
parent
9df5d948fd
commit
2bbbf5f5a1
@ -160,7 +160,7 @@ class _StarLockLoginPageState extends State<StarLockLoginPage> {
|
||||
height: 36.w,
|
||||
),
|
||||
),
|
||||
hintText: '请输入邮箱'.tr,
|
||||
hintText: '请输入邮箱或手机号'.tr,
|
||||
inputFormatters: <TextInputFormatter>[
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
FilteringTextInputFormatter.singleLineFormatter
|
||||
|
||||
@ -61,6 +61,7 @@ class _LoginInputState extends State<LoginInput> {
|
||||
}
|
||||
|
||||
Widget androidView() {
|
||||
final TextEditingController _controller = TextEditingController();
|
||||
bool isPwd = widget.isPwd ?? false;
|
||||
String pwd = (widget.controller?.text ?? '').replaceAll(RegExp(r'.'), '●');
|
||||
return Container(
|
||||
@ -85,6 +86,10 @@ class _LoginInputState extends State<LoginInput> {
|
||||
controller: widget.controller,
|
||||
focusNode: widget.focusNode,
|
||||
onChanged: (String text) {
|
||||
_controller.text = text;
|
||||
_controller.selection = TextSelection.fromPosition(
|
||||
TextPosition(offset: _controller.text.length),
|
||||
);
|
||||
if (widget.onchangeAction != null) {
|
||||
widget.onchangeAction!(text);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user