WebDrawer class

Inheritance

Constructors

WebDrawer({Key? key, required ValueNotifier<List<DrawerMenuItem>> menuItems, required dynamic onMenuTap(String navigationRoute), required Function onLogOutClick, required Color drawerTextSelectedColor, Color drawerBackground = const Color(0xFF0D1B2A), Widget? prefix, Widget? drawerHeader, Widget? drawerIcon, Color? profileBackground, String? name, String? lastName, String? email, String? version, Color drawerIconColor = DrawerColors.drawerIconColor, double drawerIconSize = 18, bool isSearchShow = false, bool isShowClearIcon = false, Widget? expandIcon, Widget? collapsedIcon, String? logOutText, Size? size, TextStyle? drawerTextStyle, TextStyle? versionTextStyle, TextStyle? searchTextStyle})
const

Properties

collapsedIcon Widget
Widget shown as the icon to collapse the drawer.
final
drawerBackground Color
Background color of the drawer.
final
drawerHeader Widget?
Optional widget displayed as the drawer header (e.g., user info, profile).
final
drawerIcon Widget
Widget used as the drawer's main icon (typically hamburger menu).
final
drawerIconColor Color
Color of the drawer icon.
final
drawerIconSize double
Size of the drawer icon.
final
drawerTextSelectedColor Color
Text color for the selected menu item.
final
drawerTextStyle TextStyle?
Optional text style used for drawer menu items.
final
email String?
Optional user's email to be displayed.
final
expandIcon Widget
Widget shown as the icon to expand the drawer.
final
hashCode int
The hash code for this object.
no setterinherited
isSearchShow bool
Whether the search bar should be displayed at the top of the drawer.
final
isShowClearIcon bool
Whether to show a clear icon (usually in search bar).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lastName String?
Optional user's last name to be displayed.
final
logOutText String?
Optional custom text to be shown for the logout option.
final
List of items to be displayed in the drawer menu.
final
name String?
Optional user's first name to be displayed.
final
onLogOutClick Function
Callback function triggered when the logout action is tapped.
final
onMenuTap → dynamic Function(String navigationRoute)
Callback function triggered when a menu item is tapped. Returns the navigation route associated with the tapped item.
final
prefix Widget
Widget displayed as a prefix (e.g., logo or avatar) in the drawer.
final
profileBackground Color?
Background color for the profile section in the drawer (if applicable).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchTextStyle TextStyle?
Optional text style used for the search field in the drawer.
final
size Size?
Optional size of the drawer (typically used when drawer is customized).
final
version String?
Optional app version string displayed in the drawer (usually at the bottom).
final
versionTextStyle TextStyle?
Optional text style used for displaying the app version.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<WebDrawer>
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, int wrapWidth = 65}) 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