|
|
|
|
@ -73,8 +73,8 @@ class AppDrawer extends StatelessWidget {
|
|
|
|
|
// 18.height,
|
|
|
|
|
drawerItem("setting", context.translation.settings, context).onPress(() => Navigator.of(context).pushNamed(SettingsPage.id)),
|
|
|
|
|
18.height,
|
|
|
|
|
if(userProvider.user!=null&&userProvider.user?.employeeIsHMG==false)
|
|
|
|
|
drawerItem("swipe", "Swipe History", context) .onPress(() => Navigator.of(context).pushNamed(SwipeHistoryView.routeName)),
|
|
|
|
|
if (userProvider.user != null && userProvider.user?.employeeIsHMG == false)
|
|
|
|
|
drawerItem("swipe", "Swipe History", context).onPress(() => Navigator.of(context).pushNamed(SwipeHistoryView.routeName)),
|
|
|
|
|
// 18.height,
|
|
|
|
|
// drawerItem("report", context.translation.reportBg, context) /*.onPress(() => Navigator.of(context).pushNamed(ReportBugPage.id))*/,
|
|
|
|
|
// 18.height,
|
|
|
|
|
@ -87,11 +87,14 @@ class AppDrawer extends StatelessWidget {
|
|
|
|
|
builder: (_) => AAlertDialog(title: context.translation.signOut, content: context.translation.logoutAlert),
|
|
|
|
|
);
|
|
|
|
|
if (result) {
|
|
|
|
|
settingProvider.resetSettings();
|
|
|
|
|
userProvider.reset();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil(LoginPage.routeName, (routes) => true);
|
|
|
|
|
bool isSuccess = await userProvider.logout(context);
|
|
|
|
|
if (isSuccess) {
|
|
|
|
|
settingProvider.resetSettings();
|
|
|
|
|
userProvider.reset();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
Navigator.of(context).pushNamedAndRemoveUntil(LoginPage.routeName, (routes) => true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
18.height,
|
|
|
|
|
|