ArcaneSidebar constructor
- Key? key,
- PylonBuilder? header,
- double width = 250,
- Curve expansionAnimationCurve = Curves.easeOutCirc,
- Duration expansionAnimationDuration = const Duration(milliseconds: 333),
- double collapsedWidth = 52,
- bool sidebarDivider = true,
- required List<
Widget> children(- BuildContext context
Creates a standard non-sliver ArcaneSidebar widget for direct use in layouts.
The {children} parameter is a builder function returning a List<Widget> of sidebar content, typically ArcaneSidebarButton instances or Section dividers for organized navigation items, initialized responsively based on ArcaneTheme and current BuildContext.
{header} is an optional PylonBuilder for custom top content, such as ArcaneSidebarHeader, allowing integration with user profiles or search via IconButton.
{footer} is an optional PylonBuilder for bottom content, like ArcaneSidebarFooter with toggles.
{width} sets the expanded width (default: 250), while {collapsedWidth} sets the minimized width (default: 52), both respecting ArcaneTheme spacing for consistent sizing.
{expansionAnimationCurve} (default: Curves.easeOutCirc) and {expansionAnimationDuration} (default: 333ms) control the smooth transition, ensuring performant animations without jank.
{sidebarDivider} (default: true) adds a subtle vertical line using Theme.of(context).colorScheme.muted for separation from adjacent Glass or main content.
Implementation
const ArcaneSidebar({
super.key,
this.header,
this.width = 250,
this.expansionAnimationCurve = Curves.easeOutCirc,
this.expansionAnimationDuration = const Duration(milliseconds: 333),
this.footer,
this.collapsedWidth = 52,
this.sidebarDivider = true,
required this.children,
}) : _isSliver = false,
sliver = _defSliver;