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),
    );
  }
}
