GlassPopover constructor
const
GlassPopover({
- Key? key,
- Widget? trigger,
- Widget triggerBuilder(
- BuildContext context,
- VoidCallback togglePopover
- required Widget contentBuilder(
- BuildContext context,
- VoidCallback close
- double popoverWidth = 280,
- double? popoverHeight,
- double popoverBorderRadius = 24.0,
- GlassMenuAlignment? alignment,
- bool autoAdjustToScreen = true,
- EdgeInsets screenPadding = const EdgeInsets.all(12),
- LiquidGlassSettings? settings,
- GlassQuality? quality,
- double stretch = 0.3,
- double interactionScale = 1.02,
- double stretchResistance = 0.08,
- Axis? stretchAxis,
- bool? allowPositiveX,
- bool? allowNegativeX,
- bool? allowPositiveY,
- bool? allowNegativeY,
- bool enableInteractionGlow = true,
- bool glowOnTapOnly = true,
- Color? glowColor,
- double glowRadius = 0.6,
- double glowIntensity = 0.0,
- VoidCallback? onClose,
- VoidCallback? onOpen,
- bool barrierDismissible = true,
- Duration blurRampDuration = const Duration(milliseconds: 260),
- Curve blurRampCurve = Curves.easeOut,
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,
}) : assert(trigger != null || triggerBuilder != null,
'Either trigger or triggerBuilder must be provided');