CustomDrawer constructor

CustomDrawer({
  1. Key? key,
  2. required Widget child,
  3. required dynamic onMenuTap(
    1. String menuPath
    ),
  4. Widget? prefix,
  5. Widget? drawerIcon,
  6. Widget? drawerHeader,
  7. Widget? headerWidget,
  8. double drawerIconSize = 24,
  9. List<DrawerMenuItem> menuItems = const [],
  10. Color drawerIconColor = DrawerColors.drawerIconColor,
  11. Color headerColor = DrawerColors.haderColor,
  12. Color drawerColor = DrawerColors.drawerBackground,
  13. Color drawerTextSelectedColor = DrawerColors.drawerIconColor,
  14. String? titleName,
  15. TextStyle? titleStyle,
  16. TextStyle? drawerTextStyle,
  17. TextStyle? userNameStyle,
  18. TextStyle? userLatsNameStyle,
  19. Color? profileBackground,
  20. String? profileImageUrl,
  21. String? version,
  22. String? userFirstName,
  23. String? userEmail,
  24. String? userLastName,
  25. bool isSearchShow = false,
  26. bool isShowUserProfile = false,
  27. bool isShowClearIcon = false,
  28. bool isShowUserName = false,
  29. Widget? expandIcon,
  30. Widget? collapsedIcon,
  31. Widget? customAppBarWidget,
  32. 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();