Files
gl_dao/lib/pages/auth/auth.dart
唐明明 4a635f3570 init
2022-05-26 11:31:11 +08:00

136 lines
4.3 KiB
Dart

import 'package:flutter/material.dart';
import '../../main_color.dart';
import './agreement.dart';
///widget
import './widget/auth_input.dart';
import './widget/auth_title.dart';
/// 登录
class AuthPages extends StatefulWidget {
const AuthPages({Key? key}) : super(key: key);
@override
State<AuthPages> createState() => _AuthPagesState();
}
class _AuthPagesState extends State<AuthPages> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
padding: const EdgeInsets.fromLTRB(30.0, 40.0, 30.0, 50.0),
decoration: const BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage('assets/login/auth_bg.png'),
),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const AuthTitle(title: '共力生态'),
const AuthTitle(title: '即可开始你的共力人生'),
const SizedBox(height: 40.0),
const AuthInput(hint: '输入手机号码'),
const SizedBox(height: 20.0),
const AuthInput(hint: '输入验证码'),
const SizedBox(height: 40.0),
SizedBox(
width: double.infinity,
height: 50.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(25.0),
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(tMainColor),
),
onPressed: null,
child: const Text(
'登录',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
const SizedBox(height: 15.0),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
'登录即表示同意',
style: TextStyle(
color: Color(0xffffffff),
),
),
TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.all(0.00),
),
overlayColor: MaterialStateProperty.all(Colors.transparent),
),
child: const Text(
'用户协议',
style: TextStyle(
color: tMainColor,
),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return const AgreementPages();
}),
);
},
),
const Text(
'',
style: TextStyle(
color: Color(0xffffffff),
),
),
TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(
const EdgeInsets.all(0.00),
),
overlayColor: MaterialStateProperty.all(Colors.transparent),
),
child: const Text(
'隐私保护',
style: TextStyle(
color: tMainColor,
),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) {
return const AgreementPages();
}),
);
},
),
const Text(
'协议',
style: TextStyle(
color: Color(0xffffffff),
),
),
],
)
],
),
),
);
}
}