GrockMenu constructor

const GrockMenu({
  1. Key? key,
  2. required Widget child,
  3. required List<GrockMenuItem> items,
  4. dynamic onTap(
    1. int value
    )?,
  5. GrockMenuController? controller,
  6. ScrollPhysics? physics,
  7. int? maxHeight,
  8. double? minWidth,
  9. BorderRadiusGeometry? borderRadius,
  10. Color? dividerColor,
  11. double? dividerHeight = 1.0,
  12. GrockMenuTapType tapType = GrockMenuTapType.onTap,
  13. TextStyle? textStyle,
  14. Color? backgroundColor,
  15. BoxBorder? border,
  16. Color? pressColor = Colors.white,
  17. int? maxLines,
  18. TextAlign? textAlign,
  19. TextOverflow? textOverflow = TextOverflow.ellipsis,
  20. EdgeInsetsGeometry? padding,
  21. bool onTapClose = true,
  22. Color spaceColor = Colors.black26,
  23. Duration openAnimationDuration = const Duration(milliseconds: 300),
  24. Duration closeAnimationDuration = const Duration(milliseconds: 250),
  25. Curve openAnimation = Curves.fastOutSlowIn,
  26. Curve closeAnimation = Curves.linear,
  27. Alignment? openAlignment,
  28. double backgroundBlur = 40.0,
  29. double spaceBlur = 1.0,
  30. double? leftSpace,
  31. double? rightSpace,
  32. double? topSpace,
  33. double? bottomSpace,
  34. Tween<double>? tween,
  35. Decoration? backgroundDecoration,
  36. Widget divider(
    1. BuildContext context,
    2. int index
    )?,
  37. bool isTopSpace = false,
  38. bool isLeftSpace = false,
  39. GrockMenuAnimationType animationType = GrockMenuAnimationType.none,
  40. Tween<Offset>? slideTween,
})

Implementation

const GrockMenu({
  Key? key,

  /// The child is the widget that will be displayed when the menu is closed.
  required this.child,

  /// The items are the menu items that will be displayed when the menu is open.
  required this.items,

  /// The onTap is the callback that will be called when the menu item is tapped.
  this.onTap,

  /// The controller is the controller that will be used to control the menu.
  this.controller,

  /// The physics is the physics that will be used to control the menu.
  this.physics,

  /// The maxHeight is the maximum height of the menu.
  this.maxHeight,

  /// The minWidth is the minimum width of the menu.
  this.minWidth,

  /// The borderRadius is the border radius of the menu.
  this.borderRadius,

  /// The dividerColor is the color of the divider.
  this.dividerColor,

  /// The dividerHeight is the height of the divider.
  this.dividerHeight = 1.0,

  /// The tapType is the type of tap that will open the menu.
  this.tapType = GrockMenuTapType.onTap,

  /// The textStyle is the text style of the menu item.
  this.textStyle,

  /// The backgroundColor is the background color of the menu.
  this.backgroundColor,

  /// The border is the border of the menu.
  this.border,

  /// The pressColor is the color of the menu item when it is pressed.
  this.pressColor = Colors.white,

  /// The maxLines is the maximum number of lines of the menu item.
  this.maxLines,

  /// The textAlign is the text alignment of the menu item.
  this.textAlign,

  /// The textOverflow is the text overflow of the menu item.
  this.textOverflow = TextOverflow.ellipsis,

  /// The padding is the padding of the menu item.
  this.padding,

  /// The onTapClose is the boolean that will be used to determine whether the menu will close when the menu item is tapped.
  this.onTapClose = true,

  /// The spaceColor is the color of the space between the menu and the menu item.
  this.spaceColor = Colors.black26,

  /// The openAnimationDuration is the duration of the open animation.
  this.openAnimationDuration = const Duration(milliseconds: 300),

  /// The closeAnimationDuration is the duration of the close animation.
  this.closeAnimationDuration = const Duration(milliseconds: 250),

  /// The openAnimation is the open animation.
  this.openAnimation = Curves.fastOutSlowIn,

  /// The closeAnimation is the close animation.
  this.closeAnimation = Curves.linear,

  /// The openAlignment is the alignment of the menu when it is open.
  this.openAlignment,

  /// The backgroundBlur is the blur of the background when the menu is open.
  this.backgroundBlur = 40.0,

  /// The spaceBlur is the blur of the space between the menu and the menu item.
  this.spaceBlur = 1.0,

  /// The leftSpace is the left space between the menu and the menu item.
  this.leftSpace,

  /// The rightSpace is the right space between the menu and the menu item.
  this.rightSpace,

  /// The topSpace is the top space between the menu and the menu item.
  this.topSpace,

  /// The bottomSpace is the bottom space between the menu and the menu item.
  this.bottomSpace,

  /// The startTween is the start tween of the menu item.
  this.tween,

  /// The backgroundDecoration is the decoration of the background when the menu is open.
  this.backgroundDecoration,

  /// The divider is the divider between the menu items.
  this.divider,

  /// The isTopSpace is the boolean that will be used to determine whether the top space will be displayed.
  this.isTopSpace = false,

  /// The isLeftSpace is the boolean that will be used to determine whether the left space will be displayed.
  this.isLeftSpace = false,

  /// GrockMenuAnimationType is the animation type of the menu.
  this.animationType = GrockMenuAnimationType.none,

  /// The slideTween is the slide tween of the menu.
  this.slideTween,
}) : super(key: key);