PieTheme constructor

const PieTheme({
  1. Brightness brightness = Brightness.light,
  2. Color? overlayColor,
  3. Color? pointerColor,
  4. Decoration? pointerDecoration,
  5. PieButtonTheme buttonTheme = const PieButtonTheme(backgroundColor: Colors.blue, iconColor: Colors.white),
  6. PieButtonTheme buttonThemeHovered = const PieButtonTheme(backgroundColor: Colors.green, iconColor: Colors.white),
  7. double? iconSize,
  8. double radius = 96,
  9. double spacing = 6,
  10. double? customAngleDiff,
  11. double angleOffset = 0,
  12. double? customAngle,
  13. PieAnchor customAngleAnchor = PieAnchor.center,
  14. Alignment? menuAlignment,
  15. Offset menuDisplacement = Offset.zero,
  16. double buttonSize = 56,
  17. double pointerSize = 40,
  18. EdgeInsets tooltipPadding = const EdgeInsets.all(32),
  19. TextStyle? tooltipTextStyle,
  20. TextAlign? tooltipTextAlign,
  21. Alignment? tooltipCanvasAlignment,
  22. bool tooltipUseFittedBox = false,
  23. Duration pieBounceDuration = const Duration(seconds: 1),
  24. bool childBounceEnabled = true,
  25. bool childTiltEnabled = true,
  26. Duration childBounceDuration = const Duration(milliseconds: 150),
  27. double childBounceFactor = 0.95,
  28. Curve childBounceCurve = Curves.easeOutCubic,
  29. Curve? childBounceReverseCurve = Curves.easeInCubic,
  30. Duration fadeDuration = const Duration(milliseconds: 250),
  31. Duration hoverDuration = const Duration(milliseconds: 250),
  32. Duration delayDuration = const Duration(milliseconds: 350),
  33. bool leftClickShowsMenu = true,
  34. bool rightClickShowsMenu = false,
  35. PieOverlayStyle overlayStyle = PieOverlayStyle.behind,
  36. double childOpacityOnButtonHover = 0.5,
})

Creates a PieTheme to configure PieMenus.

Implementation

const PieTheme({
  this.brightness = Brightness.light,
  this.overlayColor,
  this.pointerColor,
  this.pointerDecoration,
  this.buttonTheme = const PieButtonTheme(
    backgroundColor: Colors.blue,
    iconColor: Colors.white,
  ),
  this.buttonThemeHovered = const PieButtonTheme(
    backgroundColor: Colors.green,
    iconColor: Colors.white,
  ),
  this.iconSize,
  this.radius = 96,
  this.spacing = 6,
  this.customAngleDiff,
  this.angleOffset = 0,
  this.customAngle,
  this.customAngleAnchor = PieAnchor.center,
  this.menuAlignment,
  this.menuDisplacement = Offset.zero,
  this.buttonSize = 56,
  this.pointerSize = 40,
  this.tooltipPadding = const EdgeInsets.all(32),
  this.tooltipTextStyle,
  this.tooltipTextAlign,
  this.tooltipCanvasAlignment,
  this.tooltipUseFittedBox = false,
  this.pieBounceDuration = const Duration(seconds: 1),
  this.childBounceEnabled = true,
  this.childTiltEnabled = true,
  this.childBounceDuration = const Duration(milliseconds: 150),
  this.childBounceFactor = 0.95,
  this.childBounceCurve = Curves.easeOutCubic,
  this.childBounceReverseCurve = Curves.easeInCubic,
  this.fadeDuration = const Duration(milliseconds: 250),
  this.hoverDuration = const Duration(milliseconds: 250),
  this.delayDuration = const Duration(milliseconds: 350),
  this.leftClickShowsMenu = true,
  this.rightClickShowsMenu = false,
  this.overlayStyle = PieOverlayStyle.behind,
  this.childOpacityOnButtonHover = 0.5,
});