Flutter 无法在TextFormField中隐藏文本下划线
我试图在使用TextFormField时隐藏输入文本的下划线。 我已经阅读了所有的建议,但没有一个能消除下划线Flutter 无法在TextFormField中隐藏文本下划线,flutter,textformfield,Flutter,Textformfield,我试图在使用TextFormField时隐藏输入文本的下划线。 我已经阅读了所有的建议,但没有一个能消除下划线 child: TextFormField( autocorrect: false, inputFormatters: [ new FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9]"))], textAlign: TextAlign.center, decoration: InputDecor
child: TextFormField(
autocorrect: false,
inputFormatters: [ new FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9]"))],
textAlign: TextAlign.center,
decoration: InputDecoration(
hintText: "i.e. noahsclearnews",
hintStyle: TextStyle( color: Colors.grey, fontSize: ScreenUtil().setSp(40) ),
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
errorBorder: InputBorder.none,
disabledBorder: InputBorder.none,
)
)
我错过什么了吗
也许一个空格可以工作,在书写时给一个空格,你的下划线将被删除当你在键盘上独立于表单字段输入未知单词时,这是一个本机下划线,实际上不是应用程序中的事,而是安卓键盘中的事 但您可以忽略这些更正,将键盘类型设置为TextInputType.visiblePassword
TextFormField(
autocorrect: false,
keyboardType: TextInputType.visiblePassword, // Disabling word correction
decoration: InputDecoration(
hintText: "i.e. noahsclearnews",
)
)
用户名中不允许使用空格。设置键盘:TextInputType.visiblePassword未删除文本上的下划线。或者您是说将其设置为visible password只会消除其更正文本的愿望?设置keyboard:TextInputType.visiblePassword并没有删除文本上的下划线。在我完全重启应用程序之前,出于某种原因,热重新加载是不够的。谢谢!