当我单击它时,我正在尝试更改按钮的颜色。你能帮我吗,因为我真的做不到。谢谢你。
Container(
child: new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
new MaterialButton(
child: new Text("1"),
color: Colors.greenAccent,
splashColor: Colors.red,
onPressed: (){
test=0;
test=1;
},
),
new MaterialButton(
child: new Text("2"),
color: Colors.greenAccent,
onPressed: (){
test=0;
test=2;
},