本文介绍了颤振增加TextFormField的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在创建Flutter应用.我做了这样的设计.
I am creating a Flutter app. i made the design like this.
我的用于电子邮件和密码高度的TextFormField表单字段很小.我希望它的大小与按钮的大小相同.
My TextFormField form field for email and password heights are small. I want it to be the same size of the button.
final email = TextFormField( keyboardType: TextInputType.emailAddress, autofocus: false, initialValue: 'sathyabaman@gmail', style: new TextStyle(fontWeight: FontWeight.normal, color: Colors.white), decoration: InputDecoration( hintText: 'Email', contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), border: OutlineInputBorder( borderRadius: BorderRadius.circular(32.0) ), ), );在文本表单字段中表示高度的语法是什么.
Whats the syntax for the height in text form field.
推荐答案只需在InputDecoration中调整contentPadding.
Just adjust the contentPadding in InputDecoration.
final email = TextFormField( keyboardType: TextInputType.emailAddress, autofocus: false, initialValue: 'sathyabaman@gmail', style: new TextStyle(fontWeight: FontWeight.normal, color: Colors.white), decoration: InputDecoration( hintText: 'Email', contentPadding: new EdgeInsets.symmetric(vertical: 25.0, horizontal: 10.0), border: OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)), ), );
更多推荐
颤振增加TextFormField的高度
发布评论