【发布时间】:2020-10-13 15:38:51
【问题描述】:
我的 TextField 中的文本有背景。但是背景覆盖了光标。这个问题有解决方案吗?这可能是一个错误 - 光标不应落在文本背景的后面。下面是 TextField 的示例:
TextField(
autofocus: true,
keyboardType: TextInputType.multiline,
maxLines: null,
cursorColor: Colors.white,
cursorWidth: 3.0,
textInputAction: TextInputAction.done,
style: TextStyle(
color: Colors.black,
background: Paint()
..strokeWidth = 30.0
..color = Colors.white
..style = PaintingStyle.stroke
..strokeJoin = StrokeJoin.round),
);
【问题讨论】: