CollapsibleSidebar constructor
const
CollapsibleSidebar({
- Key? key,
- required List<
CollapsibleItem> items, - required Widget body,
- String title = 'Lorem Ipsum',
- TextStyle? titleStyle,
- bool titleBack = false,
- IconData titleBackIcon = Icons.arrow_back,
- MouseCursor onHoverPointer = SystemMouseCursors.click,
- TextStyle? textStyle,
- TextStyle? toggleTitleStyle,
- String toggleTitle = 'Collapse',
- dynamic avatarImg,
- double height = double.infinity,
- double minWidth = 80,
- double maxWidth = 270,
- double borderRadius = 15,
- double iconSize = 40,
- double customContentPaddingLeft = -1,
- IconData toggleButtonIcon = Icons.chevron_right,
- Color backgroundColor = const Color(0xff2B3138),
- Color avatarBackgroundColor = const Color(0xff6A7886),
- Color selectedIconBox = const Color(0xff2F4047),
- Color selectedIconColor = const Color(0xff4AC6EA),
- Color selectedTextColor = const Color(0xffF3F7F7),
- Color unselectedIconColor = const Color(0xff6A7886),
- Color unselectedTextColor = const Color(0xffC0C7D0),
- Color badgeBackgroundColor = const Color(0xffFF6767),
- Color badgeTextColor = const Color(0xffF3F7F7),
- Duration duration = const Duration(milliseconds: 500),
- Curve curve = Curves.fastLinearToSlowEaseIn,
- double screenPadding = 4,
- bool showToggleButton = true,
- double topPadding = 0,
- double bottomPadding = 0,
- double itemPadding = 10,
- double customItemOffsetX = -1,
- bool fitItemsToBottom = false,
- VoidCallback? onTitleTap,
- bool isCollapsed = true,
- bool collapseOnBodyTap = true,
- bool showTitle = true,
- 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);