我有一个平面按钮。单击按钮时,我不希望出现飞溅突出显示。我尝试将初始颜色更改为透明,但没有奏效。这是我的 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
})
关于android - 如何在 Flutter 中禁用 FlatButton 的飞溅突出显示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49107295/