【发布时间】:2018-08-12 22:06:52
【问题描述】:
我有一个平面按钮。我不希望单击按钮时出现飞溅突出显示。我尝试将初始颜色更改为透明,但没有奏效。这是我的 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
),
)
],
),
),
),
);
【问题讨论】:
-
也许您也只想将
hightlightColor设置为Colors.transparent。
标签: android ios user-interface dart flutter