alwaysSizeToContent property

bool alwaysSizeToContent
final

Determines that the overlay should always size itself to content.

Normally overlay will only size itself to content if the incoming constraints are infinite and there is a OverlayEntry that can size the overlay. Setting this to true will force this behavior even for finite (but possibly loose) constraints.

Setting this to true requires an OverlayEntry that can size the overlay based on itself (OverlayEntry.canSizeOverlay set to true). If not provided an exception is thrown.

Implementation

final bool alwaysSizeToContent;