onBackPressed method
onBackPressed returns false to stop propagating the event, true in other cases
Implementation
Future<bool> onBackPressed({BuildContext? context}) async {
if (isDrawerOpen) {
closeDrawer(context);
return false;
}
_onBackVisit();
return true;
}