颤振增加TextFormField的高度

编程入门 行业动态 更新时间:2024-10-24 18:23:00
本文介绍了颤振增加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的高度

本文发布于:2023-11-23 03:23:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:高度   TextFormField

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!