|
|
@@ -31,11 +31,11 @@ class _RegisterPageState extends State<RegisterPage> {
|
|
|
Widget buildRegisterDesktop() {
|
|
|
return Row(
|
|
|
children: [
|
|
|
- Expanded(child: RegisterTop()),
|
|
|
+ const Expanded(child: RegisterTop()),
|
|
|
Expanded(
|
|
|
child: Column(
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: [
|
|
|
+ children: const [
|
|
|
SizedBox(
|
|
|
width: 450,
|
|
|
child: RegisterForm(),
|
|
|
@@ -54,13 +54,13 @@ class _RegisterPageState extends State<RegisterPage> {
|
|
|
return Column(
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: [
|
|
|
- RegisterTop(),
|
|
|
+ const RegisterTop(),
|
|
|
Row(
|
|
|
- children: [
|
|
|
+ children: const [
|
|
|
Spacer(),
|
|
|
Expanded(
|
|
|
- child: RegisterForm(),
|
|
|
flex: 8,
|
|
|
+ child: RegisterForm(),
|
|
|
),
|
|
|
Spacer()
|
|
|
],
|
|
|
@@ -77,28 +77,28 @@ class RegisterTop extends StatelessWidget {
|
|
|
Widget build(BuildContext context) {
|
|
|
return Column(
|
|
|
children: [
|
|
|
- Text(
|
|
|
+ const Text(
|
|
|
"Register",
|
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
|
),
|
|
|
- SizedBox(
|
|
|
+ const SizedBox(
|
|
|
height: defaultPadding,
|
|
|
),
|
|
|
Row(
|
|
|
children: [
|
|
|
- Spacer(),
|
|
|
+ const Spacer(),
|
|
|
Expanded(
|
|
|
flex: 8,
|
|
|
child: SvgPicture.asset("assets/icons/signup.svg"),
|
|
|
),
|
|
|
- Spacer()
|
|
|
+ const Spacer()
|
|
|
],
|
|
|
),
|
|
|
// Text(
|
|
|
// "Register with your email and password \nor continue with social media",
|
|
|
// textAlign: TextAlign.center,
|
|
|
// ),
|
|
|
- SizedBox(
|
|
|
+ const SizedBox(
|
|
|
height: defaultPadding,
|
|
|
),
|
|
|
// SocalSigUp()
|
|
|
@@ -120,38 +120,38 @@ class RegisterForm extends StatelessWidget {
|
|
|
textInputAction: TextInputAction.next,
|
|
|
cursorColor: kPrimaryColor,
|
|
|
onSaved: (value) {},
|
|
|
- decoration: InputDecoration(
|
|
|
+ decoration: const InputDecoration(
|
|
|
hintText: "邮箱账户",
|
|
|
prefixIcon: Padding(
|
|
|
- child: Icon(Icons.person),
|
|
|
padding: EdgeInsets.all(defaultPadding),
|
|
|
+ child: Icon(Icons.person),
|
|
|
)),
|
|
|
),
|
|
|
Padding(
|
|
|
- padding: EdgeInsets.symmetric(vertical: defaultPadding),
|
|
|
+ padding: const EdgeInsets.symmetric(vertical: defaultPadding),
|
|
|
child: TextFormField(
|
|
|
textInputAction: TextInputAction.done,
|
|
|
obscureText: true,
|
|
|
cursorColor: kPrimaryColor,
|
|
|
- decoration: InputDecoration(
|
|
|
+ decoration: const InputDecoration(
|
|
|
hintText: "密码",
|
|
|
prefixIcon: Padding(
|
|
|
- child: Icon(Icons.lock),
|
|
|
padding: EdgeInsets.all(defaultPadding),
|
|
|
+ child: Icon(Icons.lock),
|
|
|
)),
|
|
|
),
|
|
|
),
|
|
|
- SizedBox(
|
|
|
+ const SizedBox(
|
|
|
height: defaultPadding / 2,
|
|
|
),
|
|
|
- ElevatedButton(onPressed: () {}, child: Text("注册")),
|
|
|
- SizedBox(
|
|
|
+ ElevatedButton(onPressed: () {}, child: const Text("注册")),
|
|
|
+ const SizedBox(
|
|
|
height: defaultPadding,
|
|
|
),
|
|
|
AlreadyHaveAnAccountCheck(
|
|
|
press: () {
|
|
|
Navigator.push(context, MaterialPageRoute(builder: (context) {
|
|
|
- return LoginPage();
|
|
|
+ return const LoginPage();
|
|
|
}));
|
|
|
},
|
|
|
login: false,
|