Answers for "change icon color onpressed flutter"

2

change icon color flutter

Icon(
  Icons.widgets,
  color: Colors.blue.shade400,
)
Posted by: Guest on December-01-2020
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

Code answers related to "change icon color onpressed flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language