WebDrawer constructor

const WebDrawer({
  1. Key? key,
  2. required ValueNotifier<List<DrawerMenuItem>> menuItems,
  3. required dynamic onMenuTap(
    1. String navigationRoute
    ),
  4. required Function onLogOutClick,
  5. required Color drawerTextSelectedColor,
  6. Color drawerBackground = const Color(0xFF0D1B2A),
  7. Widget? prefix,
  8. Widget? drawerHeader,
  9. Widget? drawerIcon,
  10. Color? profileBackground,
  11. String? name,
  12. String? lastName,
  13. String? email,
  14. String? version,
  15. Color drawerIconColor = DrawerColors.drawerIconColor,
  16. double drawerIconSize = 18,
  17. bool isSearchShow = false,
  18. bool isShowClearIcon = false,
  19. Widget? expandIcon,
  20. Widget? collapsedIcon,
  21. String? logOutText,
  22. Size? size,
  23. TextStyle? drawerTextStyle,
  24. TextStyle? versionTextStyle,
  25. TextStyle? searchTextStyle,
})

Implementation

const WebDrawer({
  super.key,
  required this.menuItems,
  required this.onMenuTap,
  required this.onLogOutClick,
  required this.drawerTextSelectedColor,
  this.drawerBackground = const Color(0xFF0D1B2A),
  Widget? prefix,

  this.drawerHeader,
  Widget? drawerIcon,
  Color? profileBackground,
  this.name,
  this.lastName,
  this.email,
  this.version,
  this.drawerIconColor = DrawerColors.drawerIconColor,
  this.drawerIconSize = 18,
  this.isSearchShow = false,
  this.isShowClearIcon = false,
  Widget? expandIcon,
  Widget? collapsedIcon,
  this.logOutText,
  this.size,
  this.drawerTextStyle,
  this.versionTextStyle,
  this.searchTextStyle,
}) : prefix = prefix ?? const SizedBox.shrink(),
     drawerIcon = drawerIcon ?? const Icon(Icons.menu),
     expandIcon = expandIcon ?? const Icon(Icons.expand_more, color: Colors.white),
     collapsedIcon = collapsedIcon ?? const Icon(Icons.expand_less, color: Colors.white),
     profileBackground = profileBackground ?? Colors.white;