我需要一个圆角 TextField
,我可以做到这一点,但它显示的是默认边框颜色。我尝试更改 borderSide
但无法更改颜色(它仍然是黑色):
TextFormField(
decoration: InputDecoration(
prefixIcon: Icon(
Icons.person,
color: Colors.white,
),
border: OutlineInputBorder(
// width: 0.0 produces a thin "hairline" border
borderRadius: BorderRadius.all(Radius.circular(90.0)),
borderSide: BorderSide(color: Colors.white24)
//borderSide: const BorderSide(),
),
hintStyle: TextStyle(color: Colors.white,fontFamily: "WorkSansLight"),
filled: true,
fillColor: Colors.white24,
hintText: 'Password'),
),
我需要这个,但我不想要焦点线,但光标应该是白色的。我尝试更改 border
参数中的所有内容,但仍然没有任何变化。
我要:
我明白了:
最佳答案
设置:
borderSide: BorderSide.none,
如:
TextFormField(
decoration: InputDecoration(
prefixIcon: Icon(
Icons.person,
color: Colors.white,
),
border: OutlineInputBorder(
// width: 0.0 produces a thin "hairline" border
borderRadius: BorderRadius.all(Radius.circular(90.0)),
borderSide: BorderSide.none,
),
hintStyle: TextStyle(color: Colors.white,fontFamily: "WorkSansLight"),
filled: true,
fillColor: Colors.white24,
hintText: 'Password'),
),
关于android - 没有边框颜色的圆角文本字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54284743/