123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- import 'package:flutter/material.dart';
- import 'package:flutter_tracker/model/config.dart';
- import 'package:flutter_tracker/pages/login_page.dart';
- import 'package:flutter_tracker/pages/register_page.dart';
- import 'package:flutter_tracker/utils/app_util.dart';
- /// Description:
- /// Time : 2021年12月03日 Friday
- /// Author : liuyuqi.gov@msncn
- class WelComePage extends StatefulWidget {
- const WelComePage({Key key}) : super(key: key);
- @override
- _WelComePageState createState() => _WelComePageState();
- }
- class _WelComePageState extends State<WelComePage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Stack(
- children: [
- Container(
- child: Image.asset(
- "assets/images/home.jpg",
- fit: BoxFit.cover,
- width: double.infinity,
- height: double.infinity,
- ),
- ),
- Positioned(
- bottom: 100,
- child: Container(
- width: MediaQuery.of(context).size.width,
- alignment: Alignment.center,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- width: 150,
- child: InkWell(
- onTap: () {
- // 登录
- Navigator.of(context).push(MaterialPageRoute(
- builder: (context) => LoginPage()));
- },
- child: Container(
- width: double.infinity,
- height: AppUtil.height(100),
- padding: EdgeInsets.only(
- right: AppUtil.width(20), left: AppUtil.width(20)),
- decoration: BoxDecoration(
- gradient: const LinearGradient(colors: [
- ThemeColor.loignColor,
- ThemeColor.loignColor
- ]),
- borderRadius: BorderRadius.circular(10),
- boxShadow: const [
- BoxShadow(
- offset: Offset(1.0, 5.0),
- color: ThemeColor.loignColor,
- blurRadius: 5.0,
- )
- ]),
- child: const Center(
- child: Text(
- "登录",
- style: TextStyle(fontSize: 20, color: Colors.white),
- ),
- ),
- ),
- ),
- ),
- Container(
- width: 200,
- child: InkWell(
- onTap: () {
- //注册
- Navigator.of(context).push(MaterialPageRoute(
- builder: (context) => RegisterPage()));
- },
- child: Container(
- margin: EdgeInsets.only(left: 20.0),
- width: double.infinity,
- height: AppUtil.height(100),
- padding: EdgeInsets.only(
- right: AppUtil.width(20), left: AppUtil.width(20)),
- decoration: BoxDecoration(
- gradient: const LinearGradient(colors: [
- ThemeColor.loignColor,
- ThemeColor.loignColor
- ]),
- borderRadius: BorderRadius.circular(10),
- boxShadow: const [
- BoxShadow(
- offset: Offset(1.0, 5.0),
- color: ThemeColor.loignColor,
- blurRadius: 5.0,
- )
- ]),
- child: const Center(
- child: Text(
- "新用户注册",
- style: TextStyle(fontSize: 20, color: Colors.white),
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- )
- ],
- ),
- );
- }
- }
|