PopOverlayContent constructor

PopOverlayContent({
  1. required Widget widget,
  2. required String id,
  3. bool shouldBlurBackground = false,
  4. Duration? duration,
  5. bool shouldDismissOnBackgroundTap = true,
  6. Function? onDismissed,
  7. Color? dismissBarrierColor,
  8. bool shouldAnimatePopup = true,
  9. Offset? popPositionOffset,
  10. Offset? offsetToPopFrom,
  11. EdgeInsetsGeometry? padding,
  12. bool hasBoxShadow = true,
  13. Color? frameColor,
  14. double frameWidth = 0.5,
  15. bool isDraggeable = false,
  16. FrameDesign? frameDesign,
  17. bool shouldMakeInvisibleOnDismiss = false,
  18. bool shouldStartInvisible = false,
  19. bool useGlobalPosition = false,
  20. Function? onMadeInvisible,
  21. Function? onMadeVisible,
  22. Function? initState,
  23. bool shouldDismissOnEscapeKey = true,
  24. Rect? dragBounds,
  25. int stackLevel = PopOverlayStackLevels.overlay,
  26. Function? onDragStart,
  27. Function? onDragEnd,
  28. Duration? popPositionAnimationDuration,
  29. Curve? popPositionAnimationCurve,
  30. BorderRadiusGeometry? borderRadius,
  31. AlignmentGeometry? alignment = Alignment.center,
  32. Object? tapRegionGroupId,
  33. TapRegionCallback? onTapRegionOutside,
  34. TapRegionCallback? onTapRegionInside,
  35. HitTestBehavior tapRegionBehavior = HitTestBehavior.deferToChild,
  36. 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 overlay
  • duration: Time after which the overlay auto-dismisses
  • shouldDismissOnBackgroundTap: Whether tapping outside dismisses the overlay
  • onDismissed: Function called when the overlay is dismissed
  • dismissBarrierColor: Color for the background barrier when tappable
  • shouldAnimatePopup: Whether to use animations for the overlay
  • popPositionOffset: Optional offset for the popup position
  • offsetToPopFrom: Optional offset for the popup start animation position
  • frameColor: Color for the frame around the overlay content
  • frameWidth: Width of the frame around the overlay content
  • isDraggeable: Whether the popup can be dragged around the screen
  • shouldMakeInvisibleOnDismiss: Whether the popup should become invisible instead of being removed when dismissed
  • shouldStartInvisible: 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 UI
  • alignment: Optional alignment for the popup. Defaults to Alignment.center
  • shouldDismissOnEscapeKey: Whether pressing Escape should dismiss this overlay (defaults to true)
  • dragBounds: Optional Rect to constrain dragging within a region
  • onMadeVisible: Callback invoked when the overlay becomes visible again
  • onDragStart: Callback invoked when dragging starts
  • onDragEnd: Callback invoked when dragging ends
  • tapRegionGroupId: Optional TapRegion.groupId for the popup content
  • onTapRegionOutside: Optional callback for taps outside the popup tap region
  • onTapRegionInside: Optional callback for taps inside the popup tap region
  • tapRegionBehavior: Hit test behavior for the popup tap region
  • tapRegionConsumeOutsideTaps: 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,
});