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

} }


class _HomeDrawerState extends State<HomeDrawer> { class _HomeDrawerState extends State<HomeDrawer> {
var currentDrawerIndex = DrawerIndex.Home;
var pref = LocalPref(); var pref = LocalPref();
UserRepository _userRepository = UserRepository(); UserRepository _userRepository = UserRepository();
List<DrawerList> drawerList; List<DrawerList> drawerList;
color: Colors.black, color: Colors.black,
), ),
onTap: () { onTap: () {
navigationtoScreen(currentDrawerIndex);
Navigator.of(context).push( Navigator.of(context).push(
MaterialPageRoute(builder: (_) => NotificationScreen())); MaterialPageRoute(builder: (_) => NotificationScreen()));
}, },
color: Colors.black, color: Colors.black,
), ),
onTap: () { onTap: () {
navigationtoScreen(currentDrawerIndex);
Navigator.of(context).push( Navigator.of(context).push(
MaterialPageRoute(builder: (_) => UpdateProfileScreen())); MaterialPageRoute(builder: (_) => UpdateProfileScreen()));
}, },
splashColor: Colors.grey.withOpacity(0.1), splashColor: Colors.grey.withOpacity(0.1),
highlightColor: Colors.transparent, highlightColor: Colors.transparent,
onTap: () { onTap: () {
currentDrawerIndex = listData.index;
navigationtoScreen(listData.index); navigationtoScreen(listData.index);
}, },
child: Stack( child: Stack(
width: 24, width: 24,
height: 24, height: 24,
child: Image.asset(listData.imageName, child: Image.asset(listData.imageName,
color: widget.screenIndex == listData.index
color: currentDrawerIndex == listData.index
? COLOR_CONST.DEFAULT ? COLOR_CONST.DEFAULT
: COLOR_CONST.BLACK), : COLOR_CONST.BLACK),
) )

Loading…
Cancel
Save