RemixSidebar<T extends Object> class

A controlled navigation panel with a fixed header, a scrollable list of destinations, and a fixed footer.

The destination region publishes a navigation landmark and selected-button destination semantics. It uses ordinary Tab traversal; Enter and Space activate the focused destination. Activating the selected destination calls onSelected again rather than suppressing reselection.

header and footer sit outside the navigation landmark because brand, search, and account content are not navigation destinations.

The panel fills the height it is given and scrolls its destination region. Given unbounded height it sizes to its content and scrolls nothing, leaving scrolling to the host. This widget owns no placement, safe area, overlay, routing, or dismissal behavior. Callers compose it inline or inside their own drawer or sheet. Use RemixLink instead for true URL or document destinations.

RemixSidebar<String>(
  header: const BrandHeader(),
  sections: const [
    RemixSidebarSection(
      label: 'Workspace',
      destinations: [
        RemixSidebarDestination(
          value: 'overview',
          label: 'Overview',
        ),
      ],
    ),
  ],
  selectedValue: selectedPage,
  onSelected: selectPage,
  footer: const AccountMenu(),
)
Inheritance

Constructors

RemixSidebar({Key? key, Widget? header, bool collapsed = false, bool showTooltips = true, OverlayPositionConfig? tooltipPositioning, double? expandedWidth, double? collapsedWidth, AnimationStyle animationStyle = const AnimationStyle(), required List<RemixSidebarSection<T>> sections, required T? selectedValue, ValueChanged<T>? onSelected, Widget? footer, bool enabled = true, String? semanticLabel, bool excludeSemantics = false, SidebarStyler style = const SidebarStyler.create(), SidebarSpec? styleSpec})
const

Properties

animationStyle → AnimationStyle
Timing for expansion and collapse, matching RemixDisclosure's API.
final
collapsed → bool
Whether to present only destination icons. Every destination must have an icon in this mode. The collapse trigger belongs to the host.
final
collapsedWidth → double?
Icon-rail width; must be positive and no greater than expandedWidth.
final
enabled → bool
Whether the destinations are interactive.
final
excludeSemantics → bool
Whether to hide the navigation landmark and every destination from semantics.
final
expandedWidth → double?
Expanded panel width. Set together with collapsedWidth to animate width with the labels and headings. When both are null, the host sizes the panel. Parent constraints still take precedence.
final
Optional fixed content below the destination region.
final
hashCode → int
The hash code for this object.
no setterinherited
Optional fixed content above the destination region.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSelected → ValueChanged<T>?
Called once for every enabled activation, including reselection.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sections → List<RemixSidebarSection<T>>
Sections rendered in visual and focus-traversal order.
final
selectedValue → T?
The selected destination value, or null when no destination is selected.
final
semanticLabel → String?
Optional accessible name for the navigation landmark.
final
showTooltips → bool
Whether collapsed destinations reveal their labels in tooltips.
final
style → SidebarStyler
Fluent visual style for the panel and its default destination style.
final
styleSpec → SidebarSpec?
Optional raw style spec that bypasses fluent and per-destination styles.
final
tooltipPositioning → OverlayPositionConfig?
Tooltip placement override; defaults to logical end with collision handling.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<RemixSidebar<T>>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

styleFrom → SidebarStyler Function({AnimationConfig? animation, FlexBoxStyler? container, FlexBoxStyler? content, ToggleStyler? destination, FlexBoxStyler? destinations, BoxStyler? footer, BoxStyler? header, WidgetModifierConfig? modifier, FlexBoxStyler? section, TextStyler? sectionLabel, TooltipStyler? tooltip, List<VariantStyle<SidebarSpec>>? variants})
Creates a fluent style for this component.
final

Static Methods

animationOf(BuildContext context) → SidebarAnimation
Reads the sidebar-owned animation for custom header/footer content. The context must be below a sidebar, for example inside a slot's Builder.
maybeAnimationOf(BuildContext context) → SidebarAnimation?
Reads the current frame, or null outside a sidebar. Style recipes can use this to coordinate their resolved visual values.