先看图,没图还说个J8
代码实现如下:
import 'package:flutter/material.dart';
import 'package:flutter_wan/utils/common.dart';
class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => new _LoginPageState();
}
class _LoginPageState extends State<LoginPage> {
final _formKey = GlobalKey<FormState>();
Color _eyeColor;
bool _isClickEye = false;
String _userName;
String _pwd;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Login'),),
body: Form(
key: _formKey,
child: ListView(
padding: EdgeInsets.all(10),
children: <Widget>[
initTitle(),
initHorizontalLine(),
initLoginName(),
SizedBox(height:30.0),
initLoginPWD(),
initForgetPwd(),
SizedBox(height:50.0),
initButton(),
initRegister(),
SizedBox(height:100.0),
initBottomIcon()
]