GlassMenu constructor

const GlassMenu({
  1. Key? key,
  2. Widget? trigger,
  3. Widget triggerBuilder(
    1. BuildContext context,
    2. VoidCallback toggleMenu
    )?,
  4. required List<Widget> items,
  5. GlassMenuAlignment? menuAlignment,
  6. bool autoAdjustToScreen = false,
  7. double menuWidth = 200,
  8. double menuBorderRadius = 32.0,
  9. double itemBorderRadius = 24.0,
  10. LiquidGlassSettings? settings,
  11. GlassQuality? quality,
  12. double stretch = 0.5,
  13. double interactionScale = 1.02,
  14. double stretchResistance = 0.08,
  15. Axis? stretchAxis,
  16. bool? allowPositiveX,
  17. bool? allowNegativeX,
  18. bool? allowPositiveY,
  19. bool? allowNegativeY,
  20. double? menuHeight,
  21. EdgeInsets menuPadding = EdgeInsets.zero,
  22. Color selectionColor = const Color(0x3DFFFFFF),
  23. bool enableInteractionGlow = true,
  24. bool glowOnTapOnly = true,
  25. Color? glowColor,
  26. double glowRadius = 0.6,
  27. double glowIntensity = 0.0,
  28. VoidCallback? onClose,
  29. GlassMenuController? controller,
  30. bool showDismissBarrier = true,
  31. bool morphFromZero = false,
  32. 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');