Answers for "Flutter Elevated button color"

5

Flutter Elevated button color

ElevatedButton(
            child: Text('Button'),
            onPressed: () {},
            style: ButtonStyle(
                backgroundColor: MaterialStateProperty.all(Colors.red),
                padding: MaterialStateProperty.all(EdgeInsets.all(50)),
                textStyle: MaterialStateProperty.all(TextStyle(fontSize: 30))),
),
Posted by: Guest on June-01-2021
3

how to change the color of the back button in app bar flutter

appBar: AppBar(
  iconTheme: IconThemeData(
    color: Colors.black, //change your color here
  ),
  title: Text("Sample"),
  centerTitle: true,
),
Posted by: Guest on July-17-2020
2

How to change background color of Elevated Button in flutter

ElevatedButton(
              style: ElevatedButton.styleFrom(
                primary: Colors.amber,
              ), 
              child: Text('ElevatedButton'),
              onPressed: () {},
            ),
Posted by: Guest on August-24-2021
7

elevated button flutter color

ElevatedButton(
  style: ButtonStyle(
    backgroundColor: MaterialStateProperty.resolveWith<Color>(
      (Set<MaterialState> states) {
        if (states.contains(MaterialState.pressed))
          return Colors.green;
        return null; // Use the component's default.
      },
    ),
  ),
)
Posted by: Guest on March-05-2021
2

flutter raisedbutton example

RaisedButton(child: Text("Rock & Roll"),
                onPressed: _changeText,
                color: Colors.red,
                textColor: Colors.yellow,
                padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
                splashColor: Colors.grey,
              )
Posted by: Guest on April-15-2020
0

flutter elevated button

const ElevatedButton({
  Key? key,
  required VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool autofocus = false,
  Clip clipBehavior = Clip.none,
  required Widget? child,
}) : super(
  key: key,
  onPressed: onPressed,
  onLongPress: onLongPress,
  style: style,
  focusNode: focusNode,
  autofocus: autofocus,
  clipBehavior: clipBehavior,
  child: child,
);
Posted by: Guest on July-16-2021

Code answers related to "Flutter Elevated button color"

Browse Popular Code Answers by Language