hyzp_ybqx-Commit099:版本号更新为version: 1.4.16+20220126,在LoginByName3页面的用户名、密码输入栏实现保持光标在最后

This commit is contained in:
WinUser01
2022-01-26 10:56:01 +08:00
parent fa00fa1792
commit 8eb964e311
2 changed files with 15 additions and 3 deletions
+13 -2
View File
@@ -274,7 +274,12 @@ class _LoginPageState extends State<LoginByName3> {
g_userInfo.username = value; g_userInfo.username = value;
}, },
endBtn: 'ClearBtn', endBtn: 'ClearBtn',
controller: TextEditingController(text: g_userInfo.username), // controller: TextEditingController(text: g_userInfo.username),
controller: TextEditingController.fromValue(TextEditingValue(
text: g_userInfo.username,
// 保持光标在最后,https://blog.csdn.net/weixin_38025168/article/details/103185466
selection: TextSelection.fromPosition(TextPosition(
affinity: TextAffinity.downstream, offset: g_userInfo.username.length)))),
onEndBtn: () { onEndBtn: () {
if (g_users.isNotEmpty) { if (g_users.isNotEmpty) {
//如果个数大于1个或者唯一一个账号跟当前账号不一样才弹出历史账号 //如果个数大于1个或者唯一一个账号跟当前账号不一样才弹出历史账号
@@ -318,7 +323,13 @@ class _LoginPageState extends State<LoginByName3> {
g_userInfo.password = value; g_userInfo.password = value;
}, },
endBtn: 'ShowHiddenBtn', endBtn: 'ShowHiddenBtn',
controller: TextEditingController(text: g_userInfo.password), // controller: TextEditingController(text: g_userInfo.password),
controller: TextEditingController.fromValue(TextEditingValue(
text: g_userInfo.password,
// 保持光标在最后,https://blog.csdn.net/weixin_38025168/article/details/103185466
selection: TextSelection.fromPosition(TextPosition(
affinity: TextAffinity.downstream,
offset: g_userInfo.password.length)))),
), ),
], ],
), ),
+2 -1
View File
@@ -55,7 +55,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# version: 1.4.14 # 为规范起见,从该版本起取消后面的 +20220124 # version: 1.4.14 # 为规范起见,从该版本起取消后面的 +20220124
#version: 1.4.14+20220124 # 無法獲取flutter编译时间,只有通过这种方式获取,所以还是保留后面的 +20220124。 #version: 1.4.14+20220124 # 無法獲取flutter编译时间,只有通过这种方式获取,所以还是保留后面的 +20220124。
# 上传软件时可以不加后面的 +20220124,否则二维码扫码后无法直接下载 # 上传软件时可以不加后面的 +20220124,否则二维码扫码后无法直接下载
version: 1.4.15+20220124 #version: 1.4.15+20220124
version: 1.4.16+20220126
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"