xxxxxxxxxx
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) {
if (states.contains(MaterialState.pressed))
return Colors.green;
return Colors.green;
},
),
),
)
xxxxxxxxxx
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.pink[400], //background color
onPrimary: Colors.black, //ripple color
)
)