import 'package:flutter/material.dart'; import 'package:jmrh/constant/styles.dart'; class LeaveMessage extends StatefulWidget { LeaveMessage({Key key}) : super(key: key); @override _LeaveMessageState createState() => _LeaveMessageState(); } class _LeaveMessageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: appBarLight('对接留言'), body: GestureDetector( child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Container( height: 68, padding: EdgeInsets.symmetric(horizontal: 16), child: Row( children: [ Text('单位名称'), Expanded( child: Text( '走马信息技术有限公司', textAlign: TextAlign.end, ), ) ], ), ), Divider(height: 1, indent: 16, endIndent: 16, color: COLOR_BORDER), Container( height: 68, padding: EdgeInsets.symmetric(horizontal: 16), child: Row( children: [ Text('单位名称'), Expanded( child: TextField( textAlign: TextAlign.end, style: TextStyle(fontSize: 14), decoration: InputDecoration.collapsed(hintText: '请输入您的姓名'), ), ) ], ), ), Divider(height: 1, indent: 16, endIndent: 16, color: COLOR_BORDER), Container( height: 68, padding: EdgeInsets.symmetric(horizontal: 16), child: Row( children: [ Text('联系方式'), Expanded( child: TextField( textAlign: TextAlign.end, style: TextStyle(fontSize: 14), decoration: InputDecoration.collapsed(hintText: '请输入您的联系方式'), ), ) ], ), ), Divider(height: 1, indent: 16, endIndent: 16, color: COLOR_BORDER), Container( height: 68, padding: EdgeInsets.symmetric(horizontal: 16), alignment: AlignmentDirectional.centerStart, child: Text('对接描述'), ), Container( height: 130, margin: EdgeInsets.symmetric(horizontal: 16), padding: EdgeInsets.all(16), decoration: BoxDecoration(color: COLOR_BORDER), child: TextField( style: TextStyle(fontSize: 14), keyboardType: TextInputType.multiline, maxLines: null, decoration: InputDecoration.collapsed(hintText: '请填写对接描述,不超过200字'), maxLength: 300, ), ), Container( height: 44, margin: EdgeInsets.symmetric(horizontal: 16, vertical: 30), child: FlatButton( textColor: Colors.white, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(0.0)), color: COLOR_PRIMARY, child: Text( '保存', style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), ), onPressed: () {}, ), ), ], ), ), onTap: () { FocusScope.of(context).requestFocus(FocusNode()); }, )); } }