I have a RaisedButton inside a Column, which is inside a Stack
Stack(
children: [
PageView(
children: [...],
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
RaisedButton(
color: Colors.teal,
child: Text("Button"),
),
...
),
...
However, instead of the button being rendered with a teal fill, it is gray and semi-transparent. Here it is on top of an orange Container.
Is there any way for me to force this button to be teal?
The color argument is used to Set Change Raised Button Background Color in Flutter iOS Android mobile app. Color can support all the useful formats like Hex color code, ARGB, RGBA and also color constants. We can pass here any color and our Raised button will generated that particular background color.
The style of this elevated button can be overridden with its style parameter. The style of all elevated buttons in a subtree can be overridden with the ElevatedButtonTheme, and the style of all of the elevated buttons in an app can be overridden with the Theme's ThemeData.elevatedButtonTheme property.
If onPressed is not provided for RaisedButton it will show up as garyed or disabled.
You can set the color to be shown for disabled RaisedButton by providing value for disabledColor
For more details visit this link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With