diff --git a/making_school_asignment_app/assets/images/eye_active.png b/making_school_asignment_app/assets/images/eye_active.png new file mode 100644 index 0000000..d8e4024 Binary files /dev/null and b/making_school_asignment_app/assets/images/eye_active.png differ diff --git a/making_school_asignment_app/assets/images/eye_default.png b/making_school_asignment_app/assets/images/eye_default.png new file mode 100644 index 0000000..e391a4c Binary files /dev/null and b/making_school_asignment_app/assets/images/eye_default.png differ diff --git a/making_school_asignment_app/lib/page/home_page/home_view.dart b/making_school_asignment_app/lib/page/home_page/home_view.dart index bf2b7e1..e52a1b0 100644 --- a/making_school_asignment_app/lib/page/home_page/home_view.dart +++ b/making_school_asignment_app/lib/page/home_page/home_view.dart @@ -78,7 +78,7 @@ class _HomePageState extends State with AutomaticKeepAliveClientMixin ), ), ),*/ - SizedBox(height: MediaQuery.of(context).padding.top / 2), + SizedBox(height: MediaQuery. of(context).padding.top / 2), Obx(() { return $TermRow([ EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: Routes.readOverPage), diff --git a/making_school_asignment_app/lib/page/login_page/login_view.dart b/making_school_asignment_app/lib/page/login_page/login_view.dart index 38a9fd7..d43ad3e 100644 --- a/making_school_asignment_app/lib/page/login_page/login_view.dart +++ b/making_school_asignment_app/lib/page/login_page/login_view.dart @@ -94,45 +94,48 @@ class _LoginPageState extends State { ),*/ child: Column(children: [ Container( - padding: EdgeInsets.symmetric(horizontal: 20.r), + padding: EdgeInsets.symmetric(horizontal: 20.h), decoration: BoxDecoration( color: Colors.transparent, border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)), borderRadius: BorderRadius.all(Radius.circular(17.w)), ), - child: Center( - child: TextField( - controller: state.userNameController, - /* maxLines: 1, - maxLength: 20,*/ - textInputAction: TextInputAction.next, - onEditingComplete: () { - Get.focusScope?.nextFocus(); - // FocusScope.of(context).requestFocus(_pwdFocus); - }, - style: TextStyle( - color: Colors.white, + child: TextField( + controller: state.userNameController, + /* maxLines: 1, + maxLength: 20,*/ + textInputAction: TextInputAction.next, + onEditingComplete: () { + Get.focusScope?.nextFocus(); + // FocusScope.of(context).requestFocus(_pwdFocus); + }, + style: TextStyle( + color: Colors.white, + fontSize: 14.sp, + ), + decoration: InputDecoration( + hintText: "请输入账号", + hintStyle: TextStyle( fontSize: 14.sp, + color: Colors.white, ), - decoration: InputDecoration( - hintText: "请输入账号", - hintStyle: TextStyle( - fontSize: 14.sp, - color: Colors.white, - ), - // labelText: "账号", - labelStyle: TextStyle( - fontSize: 14.sp, - color: Colors.white, - ), - border: InputBorder.none, - prefix: Padding( - padding: EdgeInsets.only(right: 5.r), - child: Image.asset( - 'assets/images/login_account.png', - width: 15.r, - height: 15.r, - ), + // labelText: "账号", + labelStyle: TextStyle( + fontSize: 14.sp, + color: Colors.white, + ), + border: InputBorder.none, + isDense: true, + prefixIconConstraints: BoxConstraints( + minHeight:10.w, + minWidth: 10.h, + ), + prefixIcon: Padding( + padding: EdgeInsets.only(right: 5.r), + child: Image.asset( + 'assets/images/login_account.png', + width: 15.r, + height: 15.r, ), ), ), @@ -143,7 +146,7 @@ class _LoginPageState extends State { ), Obx(() { return Container( - padding: EdgeInsets.symmetric(horizontal: 20.r), + padding: EdgeInsets.symmetric(horizontal: 20.h), decoration: BoxDecoration( color: Colors.transparent, border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)), @@ -156,7 +159,7 @@ class _LoginPageState extends State { maxLines: 1, obscureText: state.isShowPwd.value, //隐藏密码显示 - textInputAction: TextInputAction.go, + // textInputAction: state.isShowPwd.value?TextInputAction.go:TextInputAction.next, // onSubmitted: (val) => toLogin(), style: TextStyle( color: Colors.white, @@ -164,7 +167,11 @@ class _LoginPageState extends State { ), decoration: InputDecoration( hintText: "请输入密码", - prefix: Padding( + prefixIconConstraints: BoxConstraints( + minHeight:10.w, + minWidth: 10.h, + ), + prefixIcon: Padding( padding: EdgeInsets.only(right: 5.r), child: Image.asset( 'assets/images/login_pwd.png', @@ -172,6 +179,23 @@ class _LoginPageState extends State { height: 15.r, ), ), + suffixIconConstraints: BoxConstraints( + minHeight:10.w, + minWidth: 10.h, + ), + suffixIcon: InkWell( + onTap: (){ + state.isShowPwd.value = !state.isShowPwd.value; + }, + child: Padding( + padding: EdgeInsets.only(right: 5.r), + child: Image.asset( + state.isShowPwd.value ? 'assets/images/eye_default.png':'assets/images/eye_active.png', + width: 15.r, + height: 15.r, + ), + ), + ), hintStyle: TextStyle( fontSize: 14.sp, color: Colors.white, @@ -203,7 +227,7 @@ class _LoginPageState extends State { checkColor: Colors.white, value: state.keepPwd.value, onChanged: (value) { - Get.focusScope?.nextFocus(); + // Get.focusScope?.nextFocus(); FocusScope.of(context).requestFocus( state.pwdFocus); FocusScope.of(context).requestFocus( diff --git a/making_school_asignment_app/windows/runner/main.cpp b/making_school_asignment_app/windows/runner/main.cpp index da6fc06..8c9bf32 100644 --- a/making_school_asignment_app/windows/runner/main.cpp +++ b/making_school_asignment_app/windows/runner/main.cpp @@ -26,7 +26,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); + // Win32Window::Size size(1280, 720); + Win32Window::Size size(700, 900); if (!window.Create(L"making_school_asignment_app", origin, size)) { return EXIT_FAILURE; } diff --git a/making_school_asignment_app/windows/runner/resources/app_icon.ico b/making_school_asignment_app/windows/runner/resources/app_icon.ico index aae6e4b..5248030 100644 Binary files a/making_school_asignment_app/windows/runner/resources/app_icon.ico and b/making_school_asignment_app/windows/runner/resources/app_icon.ico differ