Flutter RaisedButton设置color 不生效
2020-06-08 本文已影响0人
__素颜__
RaisedButton 是有立体感,有时设置color 不生效,是因为点击禁用了,设置上onPressed就好了
RaisedButton(
child: Text("点击刷新"),
color: Colors.lightBlueAccent,
textColor: Colors.white,
onPressed: () {},
padding: EdgeInsets.symmetric(horizontal: 20),
shape: RoundedRectangleBorder(
side: BorderSide(width: 1, color: Colors.white),
borderRadius: BorderRadius.all(Radius.circular(10))),