Reputation: 7
I have an elevated button in Flutter, generally the button works fine.
However, the setting of the primary: Colors.red
in this example does not work, the button is transparent for some reason... All the other params of the ElevatedButton.styleFrom()
are working as expected.
Any assistance would be appreciated!
Widget _btnGood() {
return SizedBox(
width: MediaQuery.of(context).size.width * 0.8,
child: ElevatedButton(
onPressed: null,
style: ElevatedButton.styleFrom(
primary: Colors.purple,
side: const BorderSide(width: 8.0, color: Colors.white),
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(32)),
padding: const EdgeInsets.all(25),
),
child: const Text(
"Im Feeling Good",
style: TextStyle(
color: Colors.white,
fontSize: 30,
),
),
),
);
}
Upvotes: 0
Views: 2039