SideMenuAnimation class

The SideMenuAnimation controls the items from the lateral menu and also can control the circular reveal transition.

Inheritance

Constructors

SideMenuAnimation({Key? key, required List<Widget>? views, required List<Widget> items, required ValueChanged<int> onItemSelected, SideMenuPosition position = SideMenuPosition.left, Color selectedColor = Colors.black, Color unselectedColor = Colors.green, double? menuWidth, Duration? duration, SideMenuAnimationAppBarBuilder? appBarBuilder, int? indexSelected = 0, bool tapOutsideToDismiss = false, Color scrimColor = Colors.transparent, double? edgeDragWidth, bool enableEdgeDragGesture = false, Curve curveAnimation = Curves.linear})
Creates a SideMenuAnimation with Circular Reveal animation. Also it is responsible for updating/changing the AppBar based on the index we receive.
const
SideMenuAnimation.builder({Key? key, required SideMenuAnimationBuilder? builder, required List<Widget> items, required ValueChanged<int> onItemSelected, SideMenuPosition position = SideMenuPosition.left, Color selectedColor = Colors.black, Color unselectedColor = Colors.green, double? menuWidth, Duration? duration, bool tapOutsideToDismiss = false, Color scrimColor = Colors.transparent, double? edgeDragWidth, bool enableEdgeDragGesture = false, Curve curveAnimation = Curves.linear})
Creates a SideMenuAnimation without Circular Reveal animation. Also it is responsible for updating/changing the AppBar based on the index we receive.
const

Properties

appBarBuilder SideMenuAnimationAppBarBuilder?
appBarBuilder returns an AppBar based on the selectedIndex It also comes with the showMenu callback where we can use to open the Side Menu.
final
builder SideMenuAnimationBuilder?
builder builds a view/page based on the selectedIndex. It also comes with a showMenu` callback for opening the Side Menu.
final
curveAnimation Curve
Curve used for the animation
final
duration Duration
Duration for the animation when the menu appears, this is the total duration, each item has total_duration/items.lenght
final
edgeDragWidth double
If enableEdgeDragGesture is true, then we can change the edgeDragWidth, this is the width of the area where we do swipe.
final
enableEdgeDragGesture bool
Enables swipe from left to right to display the menu, it's false by default.
final
hashCode int
The hash code for this object.
no setterinherited
indexSelected int?
Initial index selected
final
items List<Widget>
List of items that we want to display on the Side Menu.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
Menu width for the Side Menu.
final
onItemSelected ValueChanged<int>
Function where we receive the current index selected.
final
position SideMenuPosition
Defines the position of the sider menu: left of right. By default it is SideMenuPosition.left.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrimColor Color
If tapOutsideToDismiss is true, then the scrimColor is enabled to change, this is the panel where we tap to dismiss the Side Menu.
final
selectedColor Color
Color used for the background of the selected item.
final
tapOutsideToDismiss bool
Enables to dismiss the SideMenuAnimation when user taps outside the widget. It's false by default.
final
unselectedColor Color
Color used for the background of the unselected item.
final
views List<Widget>?
Pages/Views we pass to the widge to display with a circular reveal animation
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SideMenuAnimationState
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