From 8eb964e311d0d7a4d9f8ee3b02b3c0c8e061fdee Mon Sep 17 00:00:00 2001 From: WinUser01 Date: Wed, 26 Jan 2022 10:56:01 +0800 Subject: [PATCH] =?UTF-8?q?hyzp=5Fybqx-Commit099=EF=BC=9A=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E6=9B=B4=E6=96=B0=E4=B8=BAversion:=201.4.16+?= =?UTF-8?q?20220126=EF=BC=8C=E5=9C=A8LoginByName3=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E7=94=A8=E6=88=B7=E5=90=8D=E3=80=81=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A0=8F=E5=AE=9E=E7=8E=B0=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E5=85=89=E6=A0=87=E5=9C=A8=E6=9C=80=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/Login/LoginByName3.dart | 15 +++++++++++++-- pubspec.yaml | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/pages/Login/LoginByName3.dart b/lib/pages/Login/LoginByName3.dart index aec1576..247079e 100644 --- a/lib/pages/Login/LoginByName3.dart +++ b/lib/pages/Login/LoginByName3.dart @@ -274,7 +274,12 @@ class _LoginPageState extends State { g_userInfo.username = value; }, 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: () { if (g_users.isNotEmpty) { //如果个数大于1个或者唯一一个账号跟当前账号不一样才弹出历史账号 @@ -318,7 +323,13 @@ class _LoginPageState extends State { g_userInfo.password = value; }, 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)))), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 5a91ac7..f5ae071 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 # 無法獲取flutter编译时间,只有通过这种方式获取,所以还是保留后面的 +20220124。 # 上传软件时可以不加后面的 +20220124,否则二维码扫码后无法直接下载 -version: 1.4.15+20220124 +#version: 1.4.15+20220124 +version: 1.4.16+20220126 environment: sdk: ">=2.7.0 <3.0.0"