isExpanded property
bool
get
isExpanded
True if the menu popup is expanded/open.
Implementation
bool get isExpanded => expandAction != null;
Whether the menu is open.
Sets the default expansion state when this input is used to control menu visibility. Default state means no menu items are focused when the menu popup is opened.
Implementation
@Input()
set isExpanded(bool value) {
if (isExpanded == value) return;
if (value) {
expandAction ??= const ExpandAction.withNoFocus();
} else {
expandAction = null;
}
}