handleBack method
System back order: drawer → shell history → route → false if nothing left.
Implementation
bool handleBack(BuildContext context) {
if (isDrawerOpen) {
closeDrawer();
return true;
}
if (isEndDrawerOpen) {
closeEndDrawer();
return true;
}
if (canPopShell && popShell()) return true;
if (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
return true;
}
return false;
}