flutter登录页部分内容
import 'package:flutter/material.dart'; class MyIdPage extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Title', theme: ThemeData( primarySwatch: Colors.blue, ), home: //AppFuncBrowse(), LoginPage(), ); } } class LoginPage extends StatefulWidget { @override _LoginPageState createState() { // TODO: implement createState return _LoginPageState(); } } class _LoginPageState extends State<LoginPage> { @override Widget build(BuildContext context) { return Scaffold( body: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ _buildTopBannerWidget(), _buildAccountLoginTip(), _buildEditWidget(), //_buildLoginRegisterButton(), ], ), ), ); } } _buildTopBannerWidget() { return Container( child: Image.asset( "assets/login/login_banner.png", fit: BoxFit.cover, ), ); } _buildAccountLoginTip() { return Padding( padding: EdgeInsets.all(15), child: Text( "FlySnow_2ull/会员登录", maxLines: 1, textAlign: TextAlign.start, style: TextStyle(fontSize: 16, color: Colors.black54), ), ); } _buildEditWidget() { return Container( margin: EdgeInsets.only(left: 15, right: 15), decoration: BoxDecoration( borderRadius: BorderRadius.circular(4.0), border: Border.all( //width: 1.0 / MediaQuery.of(Context).devicePixelRatio, color: Colors.grey.withOpacity(0.5)), ), ); }