change icon color flutter
Icon(
Icons.widgets,
color: Colors.blue.shade400,
)
change icon color flutter
Icon(
Icons.widgets,
color: Colors.blue.shade400,
)
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;
});
},
);
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us