GrockMenu class

Inheritance
Available Extensions

Constructors

GrockMenu({Key? key, required Widget child, required List<GrockMenuItem> items, dynamic onTap(int value)?, GrockMenuController? controller, ScrollPhysics? physics, int? maxHeight, double? minWidth, BorderRadiusGeometry? borderRadius, Color? dividerColor, double? dividerHeight = 1.0, GrockMenuTapType tapType = GrockMenuTapType.onTap, TextStyle? textStyle, Color? backgroundColor, BoxBorder? border, Color? pressColor = Colors.white, int? maxLines, TextAlign? textAlign, TextOverflow? textOverflow = TextOverflow.ellipsis, EdgeInsetsGeometry? padding, bool onTapClose = true, Color spaceColor = Colors.black26, Duration openAnimationDuration = const Duration(milliseconds: 300), Duration closeAnimationDuration = const Duration(milliseconds: 250), Curve openAnimation = Curves.fastOutSlowIn, Curve closeAnimation = Curves.linear, Alignment? openAlignment, double backgroundBlur = 40.0, double spaceBlur = 1.0, double? leftSpace, double? rightSpace, double? topSpace, double? bottomSpace, Tween<double>? tween, Decoration? backgroundDecoration, Widget divider(BuildContext context, int index)?, bool isTopSpace = false, bool isLeftSpace = false, GrockMenuAnimationType animationType = GrockMenuAnimationType.none, Tween<Offset>? slideTween})
const

Properties

animationType GrockMenuAnimationType
final
backgroundBlur double
final
backgroundColor Color?
Colors.grey.shade100
final
backgroundDecoration Decoration?
final
border BoxBorder?
final
borderRadius BorderRadiusGeometry?
The items are the menu items that will be displayed when the menu is open.
final
bottomSpace double?
Default null
final
child Widget
The child is the widget that will be displayed when the menu is closed.
final
closeAnimation Curve
Default Duration(milliseconds: 450)
final
closeAnimationDuration Duration
final
controller GrockMenuController?
final
divider → (Widget Function(BuildContext context, int index)?)
final
dividerColor Color?
CupertinoColors.separatorwithOpacity(0.2)
final
dividerHeight double?
Default 1.0
final
hashCode int
The hash code for this object.
no setterinherited
isLeftSpace bool
final
isTopSpace bool
final
items List<GrockMenuItem>
List of GrockMenuItem items
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftSpace double?
Default Automatic
final
maxHeight int?
MediaQuery.of(context).size.height * 0.35
final
maxLines int?
Text maxLines value
final
minWidth double?
MediaQuery.of(context).size.width * 0.55
final
onTap → (dynamic Function(int value)?)
OnTap callback function with index
final
onTapClose bool
Default false
final
openAlignment Alignment?
final
openAnimation Curve
Default Curves.fastOutSlowIn
final
openAnimationDuration Duration
final
padding EdgeInsetsGeometry?
Default EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0)
final
physics ScrollPhysics?
ScrollPhysics parent physics or null
final
pressColor Color?
final
rightSpace double?
Default null
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slideTween Tween<Offset>?
final
spaceBlur double
final
spaceColor Color
Background space color of the menu
final
tapType GrockMenuTapType
Default GrockMenuTapType.onTap
final
textAlign TextAlign?
Default TextAlign.start
final
textOverflow TextOverflow?
Default TextOverflow.ellipsis
final
textStyle TextStyle?
final
topSpace double?
Default Automatic
final
tween Tween<double>?
Default Tween
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<GrockMenu>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited