每当我写的时候,这个词都加了下划线。一旦我写了一个新单词,它就不会再加下划线,而是我目前正在写的东西。我可以以某种方式发出在写作时没有带下划线的内容吗?我在论坛上也没有找到任何东西。

child: TextField(
autocorrect: false,
style: TextStyle(
fontSize: 22.0,
),
cursorColor: Colors.black,
decoration: InputDecoration(
hintText: 'Search',
border: InputBorder.none,
icon: Icon(
Icons.search,
color: Color(0xFFe1F5FE),
),
),
),发布于 2020-06-05 18:33:49
你用focusedBorder试过了吗?
TextField(
decoration: new InputDecoration(
border: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.only(left: 15, bottom: 11, top: 11, right: 15),
hintText: 'what you want'
),
),发布于 2020-06-05 21:48:49
将此代码放入TextField中
keyboardType: TextInputType.text,示例:
TextField(
keyboardType: TextInputType.text,
autocorrect: false,
style: TextStyle(
fontSize: 22.0,
),
cursorColor: Colors.black,
decoration: InputDecoration(
hintText: 'Search',
border: InputBorder.none,
icon: Icon(
Icons.search,
color: Color(0xFFe1F5FE),
),
),
),https://stackoverflow.com/questions/62213074
复制相似问题