增加login页面
This commit is contained in:
parent
a8d6c2f07e
commit
d4526da56d
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'pages/splash.dart';
|
import 'pages/login.dart';
|
||||||
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
home: const SplashPage(),
|
home: const LoginPage(),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
//设置主题色
|
//设置主题色
|
||||||
|
|||||||
74
lib/pages/login.dart
Normal file
74
lib/pages/login.dart
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import '../common/app_colors.dart';
|
||||||
|
import '../common/assets.dart';
|
||||||
|
|
||||||
|
class LoginPage extends StatefulWidget {
|
||||||
|
const LoginPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<LoginPage> createState() => _LoginPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _LoginPageState extends State<LoginPage> {
|
||||||
|
//登录表达
|
||||||
|
Widget _buildForm() {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
|
||||||
|
//主视图 拆成函数
|
||||||
|
Widget _buildView(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
//logo
|
||||||
|
Image.asset(
|
||||||
|
AssetsImages.logoPng,
|
||||||
|
height: 60,
|
||||||
|
width: 57,
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 22),
|
||||||
|
|
||||||
|
//主标题
|
||||||
|
const Text(
|
||||||
|
"Let's sign you in",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
|
||||||
|
//子标题
|
||||||
|
const Text(
|
||||||
|
"Wlecome back,you've been missed",
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 13,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
color: Color(0xFFEEEEEE),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 55),
|
||||||
|
|
||||||
|
//表单
|
||||||
|
_buildForm(),
|
||||||
|
|
||||||
|
//end
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.backgroundSplash,
|
||||||
|
body: _buildView(context),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user