Answers for "flutter icon button color"

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
1

flutter RaisedButton with icon

// JZ
Container(
                  height: 25.0,
                  padding: EdgeInsets.only(left: 10.0),
                  child: RaisedButton.icon(
                    color: Colors.white,
                    label: Text(
                      'Te amo, pero no eres para mi',
                      style: TextStyle(fontSize: 13.0),
                    ),
                    icon: Icon(
                      Icons.ac_unit_outlined,
                      size: 13.0,
                    ),
                    onPressed: () {},
                  ),
                )
Posted by: Guest on February-18-2021
0

flutter IconButton change color onPressed

class SomeState extends State<StatefulWidget> {
  Color _iconColor = Colors.white;

  @override
  Widget build(BuildContext) {
    return ListTile(
      leading: new IconButton(
        icon: Icon(Icons.star, color: _iconColor),
        onPressed: () {
          setState(() {
          _iconColor = Colors.yellow;
        });
      },
    );
  }
}
Posted by: Guest on August-12-2021

Browse Popular Code Answers by Language