我需要一个带圆角的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
参数中的一切内容,但仍然没有变化。
我想要的效果:
我得到的效果:
TextFormField
中未定义cursorColor
,但在焦点上,它会改变。 - Farhana Naaz AnsariMaterialApp
中更改ThemeData
吗? - Farhana Naaz AnsarilabelText: TextStyle(color: Colors.white)
,但是出现了错误。 - Farhana Naaz Ansari