'scroll_navigation in flutter
I'm working on a flutter project and I used scroll_navigation but I want to change selectedItemColor and unselectedItemColor and I don't know how to change the color of the selected item in my scroll navigation.
@override
Widget build(BuildContext context) {
return ScrollNavigation(
bodyStyle: NavigationBodyStyle(
background: Colors.white,
borderRadius: BorderRadius.horizontal(left: Radius.circular(20)),
scrollDirection: Axis.vertical,
),
barStyle: NavigationBarStyle(
position: NavigationPosition.left,
elevation: 0.0,
background: Colors.white,
),
pages: [
Container(color: Colors.blue[100]),
Container(color: Colors.green[100]),
Container(color: Colors.purple[100]),
Container(color: Colors.amber[100]),
Container(color: Colors.deepOrange[100])
],
items: const [
ScrollNavigationItem(icon: Icon(Icons.camera)),
ScrollNavigationItem(icon: Icon(Icons.chat)),
ScrollNavigationItem(icon: Icon(Icons.favorite)),
ScrollNavigationItem(icon: Icon(Icons.notifications)),
ScrollNavigationItem(icon: Icon(Icons.home))
],
);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
