NavigationSidebar constructor

const NavigationSidebar({
  1. Key? key,
  2. Color? backgroundColor,
  3. double? spacing,
  4. NavigationLabelType labelType = NavigationLabelType.expanded,
  5. NavigationLabelPosition labelPosition = NavigationLabelPosition.end,
  6. NavigationLabelSize labelSize = NavigationLabelSize.large,
  7. EdgeInsetsGeometry? padding,
  8. BoxConstraints? constraints,
  9. Key? selectedKey,
  10. ValueChanged<Key?>? onSelected,
  11. double? surfaceOpacity,
  12. double? surfaceBlur,
  13. bool expanded = true,
  14. bool keepCrossAxisSize = false,
  15. bool keepMainAxisSize = false,
  16. List<Widget>? header,
  17. List<Widget>? footer,
  18. required List<Widget> children,
})

Creates a NavigationSidebar with the specified configuration and items.

Parameters:

  • children (List<Widget>, required): Navigation destinations
  • labelType (NavigationLabelType, default: expanded): Label display behavior
  • labelPosition (NavigationLabelPosition, default: end): Label positioning
  • labelSize (NavigationLabelSize, default: large): Size variant for items
  • selectedKey (Key?, optional): Currently selected item key
  • onSelected (ValueChanged<Key?>?, optional): Selection change callback
  • expanded (bool, default: true): Whether to fill available width

Implementation

const NavigationSidebar({
  super.key,
  this.backgroundColor,
  this.spacing,
  this.labelType = NavigationLabelType.expanded,
  this.labelPosition = NavigationLabelPosition.end,
  this.labelSize = NavigationLabelSize.large,
  this.padding,
  this.constraints,
  this.selectedKey,
  this.onSelected,
  this.surfaceOpacity,
  this.surfaceBlur,
  this.expanded = true,
  this.keepCrossAxisSize = false,
  this.keepMainAxisSize = false,
  this.header,
  this.footer,
  required this.children,
});