最佳答案
我有一个圆形的文本字段。它工作得很好,但当用户点击它,灰色背景出现。我怎样才能禁用溅射效果?
这是我的代码和结果:
new Container(
margin: const EdgeInsets.only(left: 30.0, top: 60.0, right:
30.0),
height: 40.0,
decoration: new BoxDecoration(
color: Colors.white,
borderRadius: new BorderRadius.all(new Radius.circular(25.7))
),
child: new Directionality(
textDirection: TextDirection.ltr,
child: new TextField(
controller: null,
autofocus: false,
style:
new TextStyle(fontSize: 22.0, color: Color(0xFFbdc6cf)),
decoration: new InputDecoration(
filled: true,
fillColor: Colors.white,
hintText: 'Username',
contentPadding: const EdgeInsets.only(
left: 14.0, bottom: 8.0, top: 8.0),
focusedBorder: OutlineInputBorder(
borderSide: new BorderSide(color: Colors.white),
borderRadius: new BorderRadius.circular(25.7),
),
enabledBorder: UnderlineInputBorder(
borderSide: new BorderSide(color: Colors.white),
borderRadius: new BorderRadius.circular(25.7),
),
),
))),