CustomDrawer class

Inheritance

Constructors

CustomDrawer({Key? key, required Widget child, required dynamic onMenuTap(String menuPath), Widget? prefix, Widget? drawerIcon, Widget? drawerHeader, Widget? headerWidget, double drawerIconSize = 24, List<DrawerMenuItem> menuItems = const [], Color drawerIconColor = DrawerColors.drawerIconColor, Color headerColor = DrawerColors.haderColor, Color drawerColor = DrawerColors.drawerBackground, Color drawerTextSelectedColor = DrawerColors.drawerIconColor, String? titleName, TextStyle? titleStyle, TextStyle? drawerTextStyle, TextStyle? userNameStyle, TextStyle? userLatsNameStyle, Color? profileBackground, String? profileImageUrl, String? version, String? userFirstName, String? userEmail, String? userLastName, bool isSearchShow = false, bool isShowUserProfile = false, bool isShowClearIcon = false, bool isShowUserName = false, Widget? expandIcon, Widget? collapsedIcon, Widget? customAppBarWidget, required Function onLogOutClick})

Properties

child Widget
Page to display left side of the drawer
final
collapsedIcon Widget
Widget shown as the icon to collapse the drawer.
final
customAppBarWidget Widget?
Custom widget to be displayed in the AppBar
final
drawerColor Color
Background color of the drawer
final
drawerHeader Widget?
Drawer header
final
drawerIcon Widget
Drawer icon
final
drawerIconColor Color
dawer icon color
final
drawerIconSize double
drawer icon size
final
drawerTextSelectedColor Color
Selected text color of the drawer
final
drawerTextStyle TextStyle?
Optional text style used for drawer menu items.
final
expandIcon Widget
Widget shown as the icon to expand the drawer.
final
hashCode int
The hash code for this object.
no setterinherited
headerColor Color
Drawer header color
final
headerWidget Widget?
Header widget
final
isSearchShow bool
Is show search to hanlde visibility of search box
final
isShowClearIcon bool
final
isShowUserName bool
Is show user name to handle visibility of user name
final
isShowUserProfile bool
Is show profile to handle visibility of profile
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
Menu items to display in the drawer
final
onLogOutClick Function
on logout click to handle logout
final
onMenuTap → dynamic Function(String menuPath)
on menu tap to handle navigation
final
prefix Widget
final
profileBackground Color
Background color of the profile
final
profileImageUrl String?
User profile image
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
titleName String?
Page title
final
titleStyle TextStyle?
Title TextStyle
final
userEmail String?
User email
final
userFirstName String?
User first name
final
userLastName String?
User last name
final
userLatsNameStyle TextStyle?
Last name style
final
userNameStyle TextStyle?
final
version String?
Version of the app
final

Methods

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