I am working on an ElevatedButton style in Flutter and I try to make it perfectly white inside with some elevation, but I can't achieve it. Here is my style:
ButtonStyle(
elevation: MaterialStateProperty.all(5),
backgroundColor: MaterialStateProperty.all(
Colors.white),
)
But when I try to actually use it the button isn't white, but a little bit darker.
Also when I try any other color with elevation the same thing happens and the colors aren't perfectly adequate.
I found out there is a thing called surfaceTintColor which seems to change the exact color of a button.