PopOverlayContent constructor
PopOverlayContent({
- required Widget widget,
- required String id,
- bool shouldBlurBackground = false,
- Duration? duration,
- bool shouldDismissOnBackgroundTap = true,
- Function? onDismissed,
- Color? dismissBarrierColor,
- bool shouldAnimatePopup = true,
- Offset? popPositionOffset,
- Offset? offsetToPopFrom,
- EdgeInsetsGeometry? padding,
- bool hasBoxShadow = true,
- Color? frameColor,
- double frameWidth = 0.5,
- bool isDraggeable = false,
- FrameDesign? frameDesign,
- bool shouldMakeInvisibleOnDismiss = false,
- bool shouldStartInvisible = false,
- bool useGlobalPosition = false,
- Function? onMadeInvisible,
- Function? onMadeVisible,
- Function? initState,
- bool shouldDismissOnEscapeKey = true,
- Rect? dragBounds,
- int stackLevel = PopOverlayStackLevels.overlay,
- Function? onDragStart,
- Function? onDragEnd,
- Duration? popPositionAnimationDuration,
- Curve? popPositionAnimationCurve,
- BorderRadiusGeometry? borderRadius,
- AlignmentGeometry? alignment = Alignment.center,
- Object? tapRegionGroupId,
- TapRegionCallback? onTapRegionOutside,
- TapRegionCallback? onTapRegionInside,
- HitTestBehavior tapRegionBehavior = HitTestBehavior.deferToChild,
- bool tapRegionConsumeOutsideTaps = false,
Creates a new pop overlay content configuration
Parameters:
widget: The widget to display in the overlay (required)id: Unique identifier for this overlay (required)shouldBlurBackground: Whether to blur content behind the overlayduration: Time after which the overlay auto-dismissesshouldDismissOnBackgroundTap: Whether tapping outside dismisses the overlayonDismissed: Function called when the overlay is dismisseddismissBarrierColor: Color for the background barrier when tappableshouldAnimatePopup: Whether to use animations for the overlaypopPositionOffset: Optional offset for the popup positionoffsetToPopFrom: Optional offset for the popup start animation positionframeColor: Color for the frame around the overlay contentframeWidth: Width of the frame around the overlay contentisDraggeable: Whether the popup can be dragged around the screenshouldMakeInvisibleOnDismiss: Whether the popup should become invisible instead of being removed when dismissedshouldStartInvisible: Whether the popup should start in invisible state (requires shouldMakeInvisibleOnDismiss to be true)frameDesign: Optional frame design template to wrap the widget with a standardized UIalignment: Optional alignment for the popup. Defaults to Alignment.centershouldDismissOnEscapeKey: Whether pressing Escape should dismiss this overlay (defaults to true)dragBounds: Optional Rect to constrain dragging within a regiononMadeVisible: Callback invoked when the overlay becomes visible againonDragStart: Callback invoked when dragging startsonDragEnd: Callback invoked when dragging endstapRegionGroupId: Optional TapRegion.groupId for the popup contentonTapRegionOutside: Optional callback for taps outside the popup tap regiononTapRegionInside: Optional callback for taps inside the popup tap regiontapRegionBehavior: Hit test behavior for the popup tap regiontapRegionConsumeOutsideTaps: Whether the popup tap region consumes outside taps
Implementation
PopOverlayContent({
required this.widget,
required this.id,
this.shouldBlurBackground = false,
this.duration,
this.shouldDismissOnBackgroundTap = true,
this.onDismissed,
this.dismissBarrierColor,
this.shouldAnimatePopup = true,
this.popPositionOffset,
this.offsetToPopFrom,
this.padding,
this.hasBoxShadow = true,
this.frameColor,
this.frameWidth = 0.5,
this.isDraggeable = false,
this.frameDesign,
this.shouldMakeInvisibleOnDismiss = false,
this.shouldStartInvisible = false,
this.useGlobalPosition = false,
this.onMadeInvisible,
this.onMadeVisible,
this.initState,
this.shouldDismissOnEscapeKey = true,
this.dragBounds,
this.stackLevel = PopOverlayStackLevels.overlay,
this.onDragStart,
this.onDragEnd,
this.popPositionAnimationDuration,
this.popPositionAnimationCurve,
this.borderRadius,
this.alignment = Alignment.center,
this.tapRegionGroupId,
this.onTapRegionOutside,
this.onTapRegionInside,
this.tapRegionBehavior = HitTestBehavior.deferToChild,
this.tapRegionConsumeOutsideTaps = false,
});