我有一个扁平按钮。我不希望单击按钮时突出显示。我尝试将飞溅颜色更改为透明,但这不起作用。这是我的 FlatButton 的代码。
Widget button = new Container(
child: new Container(
padding: new EdgeInsets.only(bottom: 20.0),
alignment: Alignment.center,
child: new FlatButton(
onPressed: () {
_onClickSignInButton();
},
splashColor: Colors.transparent,
child: new Stack(
alignment: Alignment.center,
children: <Widget>[
new Image.asset('images/1.0x/button1.png',
),
new Text("SIGN IN",
style: new TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16.0
),
)
],
),
),
),
);
我希望隐形的突出显示颜色可以满足您的需求:
new FlatButton({
...
splashColor: Colors.transparent,
highlightColor: Colors.transparent, // makes highlight invisible too
})
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)