I want to give a background color for an elevated button in my flutter mini app. I tried using the buttonStyle attribute but I don't know what MaterialStateProperty is.
You can use one of these two methods. And for tour question you can use the first option.
style: ButtonStyle(backgroundColor: MaterialStateProperty.all(Colors.green)),
or
style: ElevatedButton.styleFrom(primary: Colors.amber),