alignment property

AlignmentGeometry? alignment
final

Determines the desired alignment of the submenu when opened relative to the button that opens it.

If there isn't sufficient space to open the menu with the given alignment, and there's space on the other side of the button, then the alignment is swapped to it's opposite (1 becomes -1, etc.), and the menu will try to appear on the other side of the button. If there isn't enough space there either, then the menu will be pushed as far over as necessary to display as much of itself as possible, possibly overlapping the parent button.

Implementation

final AlignmentGeometry? alignment;