如何将textfield (颤振)的值居中。所以不管这个词有多大,它总是在中间?以及如何删除下划线条?
new Container(
alignment: Alignment(0.00 , 0.50),
child: new TextField(
style: new TextStyle(
fontSize: 40.0,
height: 2.0,
color: Colors.white
)
)发布于 2020-11-10 05:32:07
可以使用inputBorder.none删除边框。TextAlign.center用于设置文本中心,但您必须使用inputDecoration.collapsed而不是inputDecoration。
TextFormField(
textAlign: TextAlign.center,
decoration: InputDecoration.collapsed(
hintText: "Enter Your Name",
border: InputBorder.none
)
),https://stackoverflow.com/questions/59203527
复制相似问题