我有这个小部件:
TextFormField(
controller: _activityName,
autocorrect: true,
textAlign: TextAlign.start,
decoration: InputDecoration(
contentPadding = EdgeInsets.zero,
border: UnderlineInputBorder(
),
hintText: ""),
maxLines: 1,
cursorColor: Colors.white,
),
正如您所看到的,我明确将填充设置为0,就像这个答案中所说:如何从TextField中删除内容填充?
但是我得到的结果是这样的:
正如您所看到的,在文本MyActivity下面有很多填充,但我无法摆脱它。看起来像是一个缺陷,但我不确定:
这是flutter doctor:
Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.295], locale en-US)
• Flutter version 1.12.13+hotfix.5 %Flutter path%
• Framework revision 27321ebbad (3 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0