【发布时间】:2021-06-05 22:05:25
【问题描述】:
我有 TextFormField,我增加了这个字段的高度。我想从左上角开始文本并使该文本在行尾中断。因此,如果有人会放很多文本,那么字段将有 X 行,而不仅仅是一个。
现在的样子:
它应该是什么样子
代码:
TextFormField(
controller: contentController,
decoration: InputDecoration(
contentPadding: new EdgeInsets.symmetric(
vertical: MediaQuery.of(context).size.height * .10,
horizontal: 10.0),
border: OutlineInputBorder(),
hintText: 'Treść',
fillColor: Color(0xffffffff),
filled: true,
prefixIcon: Icon(Icons.topic_rounded),
),
validator: (value) {
if (value == null || value.isEmpty) {
return ErrorMessages.NO_CONTENT_MESSAGE;
}
},
),
【问题讨论】: