Answers for "color elevated button flutter"

6

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
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
1

how to change the color of elevatedbutton in flutter

ElevatedButton(
  child: Text("Click Me!"),
  onPressed: () {},
  style: ButtonStyle(
    backgroundColor: MaterialStateProperty.all(Colors.red),
  ),
)
Posted by: Guest on October-09-2021
1

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

Code answers related to "color elevated button flutter"

Browse Popular Code Answers by Language