GlassMenu constructor
const
GlassMenu({
- Key? key,
- Widget? trigger,
- Widget triggerBuilder(
- BuildContext context,
- VoidCallback toggleMenu
- required List<
Widget> items, - bool autoAdjustToScreen = false,
- double itemBorderRadius = 24.0,
- LiquidGlassSettings? settings,
- GlassQuality? quality,
- double stretch = 0.5,
- double interactionScale = 1.02,
- double stretchResistance = 0.08,
- Axis? stretchAxis,
- bool? allowPositiveX,
- bool? allowNegativeX,
- bool? allowPositiveY,
- bool? allowNegativeY,
- Color selectionColor = const Color(0x3DFFFFFF),
- bool enableInteractionGlow = true,
- bool glowOnTapOnly = true,
- Color? glowColor,
- double glowRadius = 0.6,
- double glowIntensity = 0.0,
- VoidCallback? onClose,
- GlassMenuController? controller,
- bool showDismissBarrier = true,
- bool morphFromZero = false,
- bool platformViewBackdrop = false,
Creates a liquid glass menu.
Implementation
const GlassMenu({
super.key,
this.trigger,
this.triggerBuilder,
required this.items,
this.menuAlignment,
this.autoAdjustToScreen = false,
this.menuWidth = 200,
this.menuBorderRadius = 32.0,
this.itemBorderRadius = 24.0,
this.settings,
this.quality,
this.stretch = 0.5,
this.interactionScale = 1.02,
this.stretchResistance = 0.08,
this.stretchAxis,
this.allowPositiveX,
this.allowNegativeX,
this.allowPositiveY,
this.allowNegativeY,
this.menuHeight,
this.menuPadding = EdgeInsets.zero,
this.selectionColor = const Color(0x3DFFFFFF),
this.enableInteractionGlow = true,
this.glowOnTapOnly = true,
this.glowColor,
this.glowRadius = 0.6,
this.glowIntensity = 0.0,
this.onClose,
this.controller,
this.showDismissBarrier = true,
this.morphFromZero = false,
this.platformViewBackdrop = false,
}) : assert(trigger != null || triggerBuilder != null,
'Either trigger or triggerBuilder must be provided');