int _pageIndex = 0;
GlobalKey _bottomNavigationKey = GlobalKey();
List pages = [
MyRoute(
iconData: Icons.home,
page:HomePage(),
),]
BottomNavigationBar: CurvedNavigationBar(
key: _bottomNavigationKey,
index: 0,
color: Colors.indigo[700],
buttonBackgroundColor: Colors.indigoAccent[100],
backgroundColor: Colors.white,
animationCurve: Curves.easeInOut,
animationDuration: Duration(milliseconds:300),
onTap: (index) {
setState(() {
_pageIndex = index; }); },),