feat:更新UI颜色
This commit is contained in:
@@ -36,7 +36,7 @@ class _LoginPage extends State<LoginPage> {
|
||||
Future<void> _loadRememberState() async {
|
||||
bool? isRemember = await SPUtil.getBool('isRemember');
|
||||
if (isRemember) {
|
||||
setState(() {
|
||||
setState(() {
|
||||
_isRemember = true;
|
||||
_username = SPUtil.getString('username');
|
||||
_password = SPUtil.getString('password');
|
||||
@@ -81,34 +81,11 @@ class _LoginPage extends State<LoginPage> {
|
||||
backgroundColor: Colors.grey[100],
|
||||
body: Form(
|
||||
key: _formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
// autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Column(
|
||||
children: [
|
||||
// 可滚动的主要内容区域
|
||||
Expanded(
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
children: [
|
||||
const SizedBox(height: kToolbarHeight),
|
||||
buildTitle(),
|
||||
const SizedBox(height: 60),
|
||||
buildUsernameTextField(),
|
||||
const SizedBox(height: 20),
|
||||
buildPasswordTextField(context),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
buildRememberPasswordCheckbox(context), // 记住密码(左对齐)
|
||||
buildForgetPasswordText(context),
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 20), // 调整与登录按钮的间距
|
||||
buildLoginButton(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(child: buildLoginForm()),
|
||||
|
||||
// 固定在底部的其他登录选项区域
|
||||
Padding(
|
||||
@@ -137,6 +114,31 @@ class _LoginPage extends State<LoginPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildLoginForm() {
|
||||
return ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
children: [
|
||||
const SizedBox(height: kToolbarHeight),
|
||||
buildTitle(),
|
||||
const SizedBox(height: 60),
|
||||
buildUsernameTextField(),
|
||||
const SizedBox(height: 20),
|
||||
buildPasswordTextField(context),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
buildRememberPasswordCheckbox(context), // 记住密码(左对齐)
|
||||
buildForgetPasswordText(context),
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 20), // 调整与登录按钮的间距
|
||||
buildLoginButton(context),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget buildUsernameTextField() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user