CustomDrawer constructor
CustomDrawer({
- Key? key,
- required Widget child,
- required dynamic onMenuTap(
- Widget? prefix,
- Widget? drawerIcon,
- Widget? drawerHeader,
- Widget? headerWidget,
- double drawerIconSize = 24,
- 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,
Implementation
CustomDrawer({
super.key,
required this.child,
required this.onMenuTap,
Widget? prefix,
Widget? drawerIcon,
Widget? drawerHeader,
this.headerWidget,
this.drawerIconSize = 24,
this.menuItems = const [],
this.drawerIconColor = DrawerColors.drawerIconColor,
this.headerColor = DrawerColors.haderColor,
this.drawerColor = DrawerColors.drawerBackground,
this.drawerTextSelectedColor = DrawerColors.drawerIconColor,
this.titleName,
TextStyle? titleStyle,
TextStyle? drawerTextStyle,
TextStyle? userNameStyle,
TextStyle? userLatsNameStyle,
Color? profileBackground,
this.profileImageUrl,
this.version,
this.userFirstName,
this.userEmail,
this.userLastName,
this.isSearchShow = false,
this.isShowUserProfile = false,
this.isShowClearIcon = false,
this.isShowUserName = false,
Widget? expandIcon,
Widget? collapsedIcon,
this.customAppBarWidget,
required this.onLogOutClick,
}) : prefix = prefix ?? const SizedBox.shrink(),
drawerIcon = drawerIcon ?? const Icon(Icons.menu),
titleStyle = titleStyle ?? DrawerStyle.headerTextStyle,
drawerTextStyle = drawerTextStyle ?? DrawerStyle.menuTextStyle,
userNameStyle = userNameStyle ?? DrawerStyle.userNameStyle,
userLatsNameStyle = userLatsNameStyle ?? DrawerStyle.userLastNameStyle,
profileBackground = profileBackground ?? Colors.transparent,
expandIcon = expandIcon ?? const Icon(Icons.expand_more, color: Colors.white),
collapsedIcon = collapsedIcon ?? const Icon(Icons.expand_less, color: Colors.white),
drawerHeader = drawerHeader ?? const SizedBox.shrink();