getIsSubMenuModalOpened method
Check is submenu modally opened
Implementation
bool getIsSubMenuModalOpened() {
bool isSubMenuOpening = false;
if (widget.menuLocation == MenuLocation.left) {
double menuRight = actualMenuRight;
double subMenuRight = actualSubMenuRight;
isSubMenuOpening = subMenuRight > menuRight;
} else {
isSubMenuOpening = getSubMenuX() < _availableSize.width - getMenuX();
}
return (_isSubMenuOpen || isSubMenuOpening) &&
(widget.bodyBehavior == BodyBehavior.move ||
widget.subMenuOpenMode == SubMenuOpenMode.floating ||
(widget.menu != null &&
widget.menuOpenMode == MenuOpenMode.floating));
}