CollapsibleSidebar constructor

const CollapsibleSidebar({
  1. Key? key,
  2. required List<CollapsibleItem> items,
  3. required Widget body,
  4. String title = 'Lorem Ipsum',
  5. TextStyle? titleStyle,
  6. bool titleBack = false,
  7. IconData titleBackIcon = Icons.arrow_back,
  8. MouseCursor onHoverPointer = SystemMouseCursors.click,
  9. TextStyle? textStyle,
  10. TextStyle? toggleTitleStyle,
  11. String toggleTitle = 'Collapse',
  12. dynamic avatarImg,
  13. double height = double.infinity,
  14. double minWidth = 80,
  15. double maxWidth = 270,
  16. double borderRadius = 15,
  17. double iconSize = 40,
  18. double customContentPaddingLeft = -1,
  19. IconData toggleButtonIcon = Icons.chevron_right,
  20. Color backgroundColor = const Color(0xff2B3138),
  21. Color avatarBackgroundColor = const Color(0xff6A7886),
  22. Color selectedIconBox = const Color(0xff2F4047),
  23. Color selectedIconColor = const Color(0xff4AC6EA),
  24. Color selectedTextColor = const Color(0xffF3F7F7),
  25. Color unselectedIconColor = const Color(0xff6A7886),
  26. Color unselectedTextColor = const Color(0xffC0C7D0),
  27. Color badgeBackgroundColor = const Color(0xffFF6767),
  28. Color badgeTextColor = const Color(0xffF3F7F7),
  29. Duration duration = const Duration(milliseconds: 500),
  30. Curve curve = Curves.fastLinearToSlowEaseIn,
  31. double screenPadding = 4,
  32. bool showToggleButton = true,
  33. double topPadding = 0,
  34. double bottomPadding = 0,
  35. double itemPadding = 10,
  36. double customItemOffsetX = -1,
  37. bool fitItemsToBottom = false,
  38. VoidCallback? onTitleTap,
  39. bool isCollapsed = true,
  40. bool collapseOnBodyTap = true,
  41. bool showTitle = true,
  42. List<BoxShadow> sidebarBoxShadow = const [BoxShadow(color: Colors.blue, blurRadius: 10, spreadRadius: 0.01, offset: Offset(3, 3))],
})

Implementation

const CollapsibleSidebar({
  Key? key,
  required this.items,
  required this.body,
  this.title = 'Lorem Ipsum',
  this.titleStyle,
  this.titleBack = false,
  this.titleBackIcon = Icons.arrow_back,
  this.onHoverPointer = SystemMouseCursors.click,
  this.textStyle,
  this.toggleTitleStyle,
  this.toggleTitle = 'Collapse',
  this.avatarImg,
  this.height = double.infinity,
  this.minWidth = 80,
  this.maxWidth = 270,
  this.borderRadius = 15,
  this.iconSize = 40,
  this.customContentPaddingLeft = -1,
  this.toggleButtonIcon = Icons.chevron_right,
  this.backgroundColor = const Color(0xff2B3138),
  this.avatarBackgroundColor = const Color(0xff6A7886),
  this.selectedIconBox = const Color(0xff2F4047),
  this.selectedIconColor = const Color(0xff4AC6EA),
  this.selectedTextColor = const Color(0xffF3F7F7),
  this.unselectedIconColor = const Color(0xff6A7886),
  this.unselectedTextColor = const Color(0xffC0C7D0),
  this.badgeBackgroundColor = const Color(0xffFF6767),
  this.badgeTextColor = const Color(0xffF3F7F7),
  this.duration = const Duration(milliseconds: 500),
  this.curve = Curves.fastLinearToSlowEaseIn,
  this.screenPadding = 4,
  this.showToggleButton = true,
  this.topPadding = 0,
  this.bottomPadding = 0,
  this.itemPadding = 10,
  this.customItemOffsetX = -1,
  this.fitItemsToBottom = false,
  this.onTitleTap,
  this.isCollapsed = true,
  this.collapseOnBodyTap = true,
  this.showTitle = true,
  this.sidebarBoxShadow = const [
    BoxShadow(
      color: Colors.blue,
      blurRadius: 10,
      spreadRadius: 0.01,
      offset: Offset(3, 3),
    ),
  ],
}) : super(key: key);