closeBehavior property
final
Defines the behavior for closing the dropdown menu when an item is selected.
The close behavior can be set to:
- DropdownMenuCloseBehavior.all: Closes all open menus in the widget tree.
- DropdownMenuCloseBehavior.self: Closes only the current dropdown menu.
- DropdownMenuCloseBehavior.none: Does not close any menus.
This property allows fine-grained control over the menu's closing behavior, which can be useful for creating nested or complex menu structures.
Defaults to DropdownMenuCloseBehavior.all.
Implementation
final DropdownMenuCloseBehavior closeBehavior;