isVerticallyExpanded property

bool isVerticallyExpanded
final

Whether the dropdown's inner contents expand to fill the available vertical space.

When true, the inner height of the dropdown is expanded to match its parent container. When false, the inner height is determined by the height of the selected item (its intrinsic height).

This is particularly useful when the dropdown is used inside a fixed-height container, ensuring that the underline and items align properly within the allocated space.

Defaults to false for DropdownButtonFormField to ensure the input decorator handles the vertical constraints correctly by default.

See also:

Implementation

final bool isVerticallyExpanded;