From ec7848ad57d19442ed40ee844508dd34de68ed65 Mon Sep 17 00:00:00 2001 From: zhutao <1812073942@qq.com> Date: Fri, 29 Aug 2025 11:41:00 +0800 Subject: [PATCH] 2 --- lib/page/system/login/login_page.dart | 140 +++++++++--------- .../system/login/widget/agreement_box.dart | 1 + 2 files changed, 69 insertions(+), 72 deletions(-) diff --git a/lib/page/system/login/login_page.dart b/lib/page/system/login/login_page.dart index 5a82cb7..19acea0 100644 --- a/lib/page/system/login/login_page.dart +++ b/lib/page/system/login/login_page.dart @@ -207,83 +207,79 @@ class _LoginPageState extends State { child: Scaffold( resizeToAvoidBottomInset: false, body: SafeArea( - child: Stack( - alignment: Alignment.center, - children: [ - Container( - width: double.infinity, - padding: EdgeInsets.only( - top: 0.07.sh, - left: 20, - right: 20, + child: Container( + width: double.infinity, + padding: EdgeInsets.only( + top: 0.07.sh, + left: 20, + right: 20, + ), + child: Column( + children: [ + LogoBox(), + PageHeader(), + InputBox( + hintText: "Email", + controller: _emailController, ), - child: Column( - children: [ - LogoBox(), - PageHeader(), - InputBox( - hintText: "Email", - controller: _emailController, + SizedBox(height: 15), + InputBox( + obscureText: _hidePassword, + hintText: "Password", + controller: _passwordController, + suffix: InkWell( + onTap: () { + setState(() { + _hidePassword = !_hidePassword; + }); + }, + child: Icon( + _hidePassword ? RemixIcons.eye_off_fill : RemixIcons.eye_fill, + size: 20, + color: Theme.of(context).colorScheme.onSurfaceVariant, ), - SizedBox(height: 15), - InputBox( - obscureText: _hidePassword, - hintText: "Password", - controller: _passwordController, - suffix: InkWell( - onTap: () { - setState(() { - _hidePassword = !_hidePassword; - }); - }, - child: Icon( - _hidePassword ? RemixIcons.eye_off_fill : RemixIcons.eye_fill, - size: 20, - color: Theme.of(context).colorScheme.onSurfaceVariant, - ), - ), - ), - Container( - margin: EdgeInsets.only(top: 20), - height: 45, - child: CustomButton( - loading: _subLoading, - round: false, - onPressed: _handSubmit, - child: Text("Continue"), - ), - ), - LoginDivider(), - OtherButton( - title: "Continue with Google", - icon: "assets/image/google.png", - onTap: () { - _handleGoogleSignIn(); - }, - ), - SizedBox(height: 15), - OtherButton( - title: "Continue with Apple", - icon: "assets/image/apple.png", - onTap: () { - _handAppleSignIn(); - }, - ), - ], + ), ), - ), - Positioned( - bottom: 20, - child: AgreementBox( - checked: _agree, - onChanged: (value) { - setState(() { - _agree = value; - }); + Container( + margin: EdgeInsets.only(top: 20), + height: 45, + child: CustomButton( + loading: _subLoading, + round: false, + onPressed: _handSubmit, + child: Text("Continue"), + ), + ), + LoginDivider(), + OtherButton( + title: "Continue with Google", + icon: "assets/image/google.png", + onTap: () { + _handleGoogleSignIn(); }, ), - ), - ], + SizedBox(height: 15), + OtherButton( + title: "Continue with Apple", + icon: "assets/image/apple.png", + onTap: () { + _handAppleSignIn(); + }, + ), + Container( + margin: EdgeInsets.only(top: 20), + width: double.infinity, + child: AgreementBox( + checked: _agree, + onChanged: (value) { + setState(() { + _agree = value; + }); + }, + ), + ), + ], + ), ), ), ), diff --git a/lib/page/system/login/widget/agreement_box.dart b/lib/page/system/login/widget/agreement_box.dart index 20665f2..77f0788 100644 --- a/lib/page/system/login/widget/agreement_box.dart +++ b/lib/page/system/login/widget/agreement_box.dart @@ -17,6 +17,7 @@ class AgreementBox extends StatelessWidget { @override Widget build(BuildContext context) { return Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( width: 25,