show<T> abstract method
OverlayCompleter<T?>
show<T>({
- required BuildContext context,
- required AlignmentGeometry alignment,
- required WidgetBuilder builder,
- Offset? position,
- AlignmentGeometry? anchorAlignment,
- PopoverConstraint widthConstraint = PopoverConstraint.flexible,
- PopoverConstraint heightConstraint = PopoverConstraint.flexible,
- Key? key,
- bool rootOverlay = true,
- bool modal = true,
- bool barrierDismissable = true,
- Clip clipBehavior = Clip.none,
- Object? regionGroupId,
- Offset? offset,
- AlignmentGeometry? transitionAlignment,
- EdgeInsetsGeometry? margin,
- bool follow = true,
- bool consumeOutsideTaps = true,
- Anchor? anchor,
- ValueChanged<
PopoverOverlayWidgetState> ? onTickFollow, - bool allowInvertHorizontal = true,
- bool allowInvertVertical = true,
- bool dismissBackdropFocus = true,
- Duration? showDuration,
- Duration? dismissDuration,
- OverlayBarrier? overlayBarrier,
Shows an overlay with the specified configuration.
Displays an overlay (popover, sheet, or dialog) with extensive customization options for positioning, sizing, behavior, and appearance.
Parameters:
context(BuildContext, required): Build contextalignment(AlignmentGeometry, required): Overlay alignmentbuilder(WidgetBuilder, required): Overlay content builderposition(Offset?): Explicit position (overrides alignment)anchorAlignment(AlignmentGeometry?): Anchor alignmentwidthConstraint(PopoverConstraint): Width constraint, defaults to flexibleheightConstraint(PopoverConstraint): Height constraint, defaults to flexiblekey(Key?): Widget keyrootOverlay(bool): Use root overlay, defaults to truemodal(bool): Modal behavior, defaults to truebarrierDismissable(bool): Dismissible by tapping barrier, defaults to trueclipBehavior(Clip): Clipping behavior, defaults to noneregionGroupId(Object?): Region group IDoffset(Offset?): Position offsettransitionAlignment(AlignmentGeometry?): Transition alignmentmargin(EdgeInsetsGeometry?): Overlay marginfollow(bool): Follow anchor on move, defaults to trueconsumeOutsideTaps(bool): Consume outside taps, defaults to trueonTickFollow(ValueChanged<PopoverOverlayWidgetState>?): Follow tick callbackallowInvertHorizontal(bool): Allow horizontal inversion, defaults to trueallowInvertVertical(bool): Allow vertical inversion, defaults to truedismissBackdropFocus(bool): Dismiss on backdrop focus, defaults to trueshowDuration(Duration?): Show animation durationdismissDuration(Duration?): Dismiss animation durationoverlayBarrier(OverlayBarrier?): Custom barrier configurationanchor(Anchor?): Anchor to position/track against, defaults to a ContextAnchor wrappingcontext
Returns an OverlayCompleter for managing the overlay lifecycle.
Implementation
OverlayCompleter<T?> show<T>({
required BuildContext context,
required AlignmentGeometry alignment,
required WidgetBuilder builder,
Offset? position,
AlignmentGeometry? anchorAlignment,
PopoverConstraint widthConstraint = PopoverConstraint.flexible,
PopoverConstraint heightConstraint = PopoverConstraint.flexible,
Key? key,
bool rootOverlay = true,
bool modal = true,
bool barrierDismissable = true,
Clip clipBehavior = Clip.none,
Object? regionGroupId,
Offset? offset,
AlignmentGeometry? transitionAlignment,
EdgeInsetsGeometry? margin,
bool follow = true,
bool consumeOutsideTaps = true,
Anchor? anchor,
ValueChanged<PopoverOverlayWidgetState>? onTickFollow,
bool allowInvertHorizontal = true,
bool allowInvertVertical = true,
bool dismissBackdropFocus = true,
Duration? showDuration,
Duration? dismissDuration,
OverlayBarrier? overlayBarrier,
});