Browse Source

hide slide menu when tap setting, notification

master
daivph 5 years ago
parent
commit
e2a4245e28
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      lib/presentation/screens/slide_menu/home_drawer.dart

+ 5
- 1
lib/presentation/screens/slide_menu/home_drawer.dart View File

@@ -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),
)

Loading…
Cancel
Save