fish 1 year ago
parent
commit
c4d7410f0a

+ 7 - 7
lib/pages/login_page.dart

@@ -29,13 +29,13 @@ class _LoginPageState extends State<LoginPage> {
   }
 
   Widget buildLoginDesktop() {
-    return Row(
+    return const Row(
       children: [
-        const Expanded(child: LoginTop()),
+        Expanded(child: LoginTop()),
         Expanded(
             child: Row(
           mainAxisAlignment: MainAxisAlignment.center,
-          children: const [
+          children: [
             SizedBox(
               width: 450,
               child: LoginForm(),
@@ -47,12 +47,12 @@ class _LoginPageState extends State<LoginPage> {
   }
 
   Widget buildLoginMobile() {
-    return Column(
+    return const Column(
       mainAxisAlignment: MainAxisAlignment.center,
       children: [
-        const LoginTop(),
+        LoginTop(),
         Row(
-          children: const [
+          children: [
             Spacer(),
             Expanded(
               flex: 8,
@@ -107,7 +107,7 @@ class LoginForm extends StatelessWidget {
             tag: "login_btn",
             child: ElevatedButton(
               onPressed: () {},
-              child: Text(
+              child: const Text(
                 "登录",
               ),
             ),

+ 6 - 6
lib/pages/register/register_page.dart

@@ -29,13 +29,13 @@ class _RegisterPageState extends State<RegisterPage> {
   }
 
   Widget buildRegisterDesktop() {
-    return Row(
+    return const Row(
       children: [
-        const Expanded(child: RegisterTop()),
+        Expanded(child: RegisterTop()),
         Expanded(
             child: Column(
           mainAxisAlignment: MainAxisAlignment.center,
-          children: const [
+          children: [
             SizedBox(
               width: 450,
               child: RegisterForm(),
@@ -51,12 +51,12 @@ class _RegisterPageState extends State<RegisterPage> {
   }
 
   Widget buildRegisterMobile() {
-    return Column(
+    return const Column(
       mainAxisAlignment: MainAxisAlignment.center,
       children: [
-        const RegisterTop(),
+        RegisterTop(),
         Row(
-          children: const [
+          children: [
             Spacer(),
             Expanded(
               flex: 8,

+ 0 - 2
lib/pages/welcome/welcome_page.dart

@@ -1,7 +1,5 @@
 import 'package:flutter/material.dart';
 import 'package:flutter_auth/models/config.dart';
-import 'package:flutter_auth/pages/login_page.dart';
-import 'package:flutter_auth/pages/register/register_page.dart';
 import 'package:flutter_auth/pages/welcome/welcome_image.dart';
 import 'package:flutter_auth/pages/background.dart';
 import 'package:flutter_auth/routes.dart';