| @@ -26,6 +26,7 @@ class HomeDrawer extends StatefulWidget { | |||
| } | |||
| class _HomeDrawerState extends State<HomeDrawer> { | |||
| var currentDrawerIndex = DrawerIndex.Home; | |||
| var pref = LocalPref(); | |||
| UserRepository _userRepository = UserRepository(); | |||
| List<DrawerList> drawerList; | |||
| @@ -158,6 +159,7 @@ class _HomeDrawerState extends State<HomeDrawer> { | |||
| color: Colors.black, | |||
| ), | |||
| onTap: () { | |||
| navigationtoScreen(currentDrawerIndex); | |||
| Navigator.of(context).push( | |||
| MaterialPageRoute(builder: (_) => NotificationScreen())); | |||
| }, | |||
| @@ -179,6 +181,7 @@ class _HomeDrawerState extends State<HomeDrawer> { | |||
| color: Colors.black, | |||
| ), | |||
| onTap: () { | |||
| navigationtoScreen(currentDrawerIndex); | |||
| Navigator.of(context).push( | |||
| MaterialPageRoute(builder: (_) => UpdateProfileScreen())); | |||
| }, | |||
| @@ -220,6 +223,7 @@ class _HomeDrawerState extends State<HomeDrawer> { | |||
| splashColor: Colors.grey.withOpacity(0.1), | |||
| highlightColor: Colors.transparent, | |||
| onTap: () { | |||
| currentDrawerIndex = listData.index; | |||
| navigationtoScreen(listData.index); | |||
| }, | |||
| child: Stack( | |||
| @@ -240,7 +244,7 @@ class _HomeDrawerState extends State<HomeDrawer> { | |||
| width: 24, | |||
| height: 24, | |||
| child: Image.asset(listData.imageName, | |||
| color: widget.screenIndex == listData.index | |||
| color: currentDrawerIndex == listData.index | |||
| ? COLOR_CONST.DEFAULT | |||
| : COLOR_CONST.BLACK), | |||
| ) | |||