SideDrawer<T> class

Inheritance

Constructors

SideDrawer({Menu<T>? menu, Widget? headerView, Widget? footerView, T? selectedItemId, bool slide = false, double? percentage, double? degree, MenuItemSelected<T>? onMenuItemSelected, Widget? child, Color color = Colors.white, DecorationImage? background, bool animation = false, Direction direction = Direction.left, Color? selectorColor, double drawerWidth = 300, double peekSize = 56, Duration? duration, Curve? curve, TextStyle? textStyle, EdgeInsets? padding, Alignment alignment = Alignment.centerLeft, SideDrawerItemBuilder? itemBuilder, double elevation = 16, double? cornerRadius, bool withSafeAre = true, Key? key, bool peekMenu = false, bool hideOnItemPressed = true})
SideDrawer.child({required Widget? child, Widget? headerView, Widget? footerView, bool slide = false, double? percentage, double? degree, Color color = Colors.white, DecorationImage? background, bool animation = false, Direction direction = Direction.left, Color? selectorColor, double drawerWidth = 300, double peekSize = 56, Duration? duration, Curve? curve, TextStyle? textStyle, EdgeInsets? padding, Alignment alignment = Alignment.centerLeft, double elevation = 16, double? cornerRadius, bool withSafeAre = true, Key? key, bool peekMenu = false, bool hideOnItemPressed = true})
SideDrawer.custom({required SideDrawerBuilder itemBuilder, Widget? headerView, Widget? footerView, bool slide = false, double? percentage, double? degree, Color color = Colors.white, DecorationImage? background, bool animation = false, Direction direction = Direction.left, Color? selectorColor, double drawerWidth = 300, double peekSize = 56, Duration? duration, Curve? curve, TextStyle? textStyle, EdgeInsets? padding, Alignment alignment = Alignment.centerLeft, double elevation = 16, double? cornerRadius, bool withSafeAre = true, Key? key, bool peekMenu = false, bool hideOnItemPressed = true})

Properties

alignment Alignment
Menu Alignment in drawer
final
animation bool
Flag for animation on menu item
final
background DecorationImage?
Background for drawer
final
child Widget?
Widget for side drawer
final
color Color
Background Color for drawer
final
cornerRadius double?
Card's corner radius
final
curve Curve?
Transition's Curve, Default : Curves.easeOut
final
degree double?
Degree of rotation : 15->45 degree
final
direction Direction
Direction the drawer will appear (Direction.left or Direction.right) Default: Direction.left
final
drawerWidth double
Drawer's width in Pixel, Default : 300px
final
duration Duration?
Transition's Duration, Defalut: 250ms
final
elevation double
Card's elevation Default : 16
final
footerView Widget?
Widget for footer on drawer
final
hashCode int
The hash code for this object.
no setterinherited
headerView Widget?
Widget for header on drawer
final
hideOnItemPressed bool
final
itemBuilder SideDrawerBuilder
Custom builder for menu item
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
Menu for drawer
final
onMenuItemSelected MenuItemSelected<T>?
listen to menu selected
final
padding EdgeInsets
Menu Padding in drawer
final
peekMenu bool
final
peekSize double
peekSize, default = 56
final
percentage double
Scaling Percentage base on width and height
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleDownCurve Curve
Easing Curve for scale down
final
scaleUpCurve Curve
Easing Curve for scale up
final
selectedItemId → T?
Current selected ID
final
selectorColor Color?
Color for selected menu item
final
slide bool
Flag for drawer slide with main container
final
slideInCurve Curve
Easing Curve for slide in
final
slideOutCurve Curve
Easing Curve for slide out
final
textStyle TextStyle?
Menu item TextStyle
final
withSafeAre bool
to enable/disable SafeArea for headerView & footerView, default = true
final

Methods

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

Static Methods

count({required int itemCount, required SideDrawerIndexBuilder builder, Widget? headerView, Widget? footerView, int? selectedItemId, bool slide = false, double? percentage, double? degree, MenuItemSelected<int>? onMenuItemSelected, Color color = Colors.white, DecorationImage? background, bool animation = false, Direction direction = Direction.left, Color? selectorColor, double drawerWidth = 300, double peekSize = 56, Duration? duration, Curve? curve, TextStyle? textStyle, EdgeInsets? padding, Alignment alignment = Alignment.centerLeft, double elevation = 16, double? cornerRadius, bool withSafeAre = true, Key? key, bool peekMenu = false, bool hideOnItemPressed = true}) SideDrawer<int>