GlassPopover constructor

const GlassPopover({
  1. Key? key,
  2. Widget? trigger,
  3. Widget triggerBuilder(
    1. BuildContext context,
    2. VoidCallback togglePopover
    )?,
  4. required Widget contentBuilder(
    1. BuildContext context,
    2. VoidCallback close
    ),
  5. double popoverWidth = 280,
  6. double? popoverHeight,
  7. double popoverBorderRadius = 24.0,
  8. GlassMenuAlignment? alignment,
  9. bool autoAdjustToScreen = true,
  10. EdgeInsets screenPadding = const EdgeInsets.all(12),
  11. LiquidGlassSettings? settings,
  12. GlassQuality? quality,
  13. double stretch = 0.3,
  14. double interactionScale = 1.02,
  15. double stretchResistance = 0.08,
  16. Axis? stretchAxis,
  17. bool? allowPositiveX,
  18. bool? allowNegativeX,
  19. bool? allowPositiveY,
  20. bool? allowNegativeY,
  21. bool enableInteractionGlow = true,
  22. bool glowOnTapOnly = true,
  23. Color? glowColor,
  24. double glowRadius = 0.6,
  25. double glowIntensity = 0.0,
  26. VoidCallback? onClose,
  27. VoidCallback? onOpen,
  28. bool barrierDismissible = true,
  29. Duration blurRampDuration = const Duration(milliseconds: 260),
  30. Curve blurRampCurve = Curves.easeOut,
  31. String? semanticLabel,
})

Creates a liquid glass popover.

Implementation

const GlassPopover({
  super.key,
  this.trigger,
  this.triggerBuilder,
  required this.contentBuilder,
  this.popoverWidth = 280,
  this.popoverHeight,
  this.popoverBorderRadius = 24.0,
  this.alignment,
  this.autoAdjustToScreen = true,
  this.screenPadding = const EdgeInsets.all(12),
  this.settings,
  this.quality,
  this.stretch = 0.3,
  this.interactionScale = 1.02,
  this.stretchResistance = 0.08,
  this.stretchAxis,
  this.allowPositiveX,
  this.allowNegativeX,
  this.allowPositiveY,
  this.allowNegativeY,
  this.enableInteractionGlow = true,
  this.glowOnTapOnly = true,
  this.glowColor,
  this.glowRadius = 0.6,
  this.glowIntensity = 0.0,
  this.onClose,
  this.onOpen,
  this.barrierDismissible = true,
  this.blurRampDuration = const Duration(milliseconds: 260),
  this.blurRampCurve = Curves.easeOut,
  this.semanticLabel,
}) : assert(trigger != null || triggerBuilder != null,
          'Either trigger or triggerBuilder must be provided');