'How do i make my Inkwell onhover work on my menu items?
I am trying to create an onHover effect on my navigation menu, my approach was to create boolean list as long as my navigation menu items and with initial false values, then when a menu item is hovered change the color, my problem is the value parameter from the inkwell onhover function is printing out the right value to console but it's not affecting my menu item color, any suggestions? When i run it, it remains the color red with the onhover having no effect
final List hover = [false, false, false, false, false];
InkWell(
onHover: (value) {
setState(() {
value ? hover[1] = true : hover[1] = false;
});
},
onTap: () {},
child: Text('Org Chart',
style: TextStyle(
color: hover[1] ? Colors.black : Colors.red))),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
