ArcaneSidebar constructor

const ArcaneSidebar({
  1. Key? key,
  2. PylonBuilder? header,
  3. double width = 250,
  4. Curve expansionAnimationCurve = Curves.easeOutCirc,
  5. Duration expansionAnimationDuration = const Duration(milliseconds: 333),
  6. PylonBuilder? footer,
  7. double collapsedWidth = 52,
  8. bool sidebarDivider = true,
  9. required List<Widget> children(
    1. 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;