login page first commit

main
zhuce 2024-03-07 18:00:47 +08:00
parent bd18be317c
commit 1d32b674f7
4 changed files with 89 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import 'package:autosos_flutter/pages/home/home_page.dart';
import 'package:autosos_flutter/pages/login/login_page.dart';
import 'package:flutter/material.dart';
void main() {
@ -17,6 +18,6 @@ class MyApp extends StatelessWidget {
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const HomePage());
home: const LoginPage());
}
}

View File

@ -1,10 +1,11 @@
import 'package:amap_flutter_map/amap_flutter_map.dart';
import 'package:autosos_flutter/const_config.dart';
import 'package:autosos_flutter/pages/config/theme_colors.dart';
import 'package:autosos_flutter/pages/home/widgets/image_block.dart';
import 'package:autosos_flutter/pages/home/widgets/number_block.dart';
import 'package:flutter/material.dart';
import '../../config/theme_colors.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});

View File

@ -0,0 +1,85 @@
import 'package:flutter/material.dart';
class LoginPage extends StatefulWidget {
const LoginPage({super.key});
@override
State<LoginPage> createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Column(
children: [
ListTile(
leading: Image.asset(
"images/1.5x/ic_launcher.png",
height: 54,
width: 54,
),
title: const Text(
"欢迎登陆啾啾救援",
style: TextStyle(fontSize: 23, fontWeight: FontWeight.bold),
),
subtitle: const Text(
"宁波易到互联科技有限公司",
style: TextStyle(
fontSize: 13,
),
),
),
Padding(
padding: const EdgeInsets.all(20),
child: Row(
children: [
const Text(
"+86",
style: TextStyle(fontSize: 16, color: Color(0xFF1D1D1D)),
),
Padding(
padding: const EdgeInsets.all(15),
child: Container(
height: 20,
width: 1,
color: Colors.grey,
),
),
const Expanded(
child: TextField(
decoration: InputDecoration(hintText: "请输入手机号"),
)),
],
),
),
const Padding(
padding: EdgeInsets.all(20),
child: Row(
children: [
Expanded(
child: TextField(
decoration: InputDecoration(hintText: "请输入密码"),
))
],
),
),
Padding(
padding: const EdgeInsets.all(20),
child: Container(
padding: const EdgeInsets.all(12),
margin: const EdgeInsets.only(top: 40),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(color: Colors.grey,borderRadius: BorderRadius.circular(21)),
child: const Center(
child: Text(
"登录",
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
))),
)
],
),
);
}
}