NavigationSidebar constructor
const
NavigationSidebar({
- Key? key,
- Color? backgroundColor,
- double? spacing,
- NavigationLabelType labelType = NavigationLabelType.expanded,
- NavigationLabelPosition labelPosition = NavigationLabelPosition.end,
- NavigationLabelSize labelSize = NavigationLabelSize.large,
- EdgeInsetsGeometry? padding,
- BoxConstraints? constraints,
- Key? selectedKey,
- ValueChanged<
Key?> ? onSelected, - double? surfaceOpacity,
- double? surfaceBlur,
- bool expanded = true,
- bool keepCrossAxisSize = false,
- bool keepMainAxisSize = false,
- List<
Widget> ? header, - required List<
Widget> children,
Creates a NavigationSidebar with the specified configuration and items.
Parameters:
children(List<Widget>, required): Navigation destinationslabelType(NavigationLabelType, default: expanded): Label display behaviorlabelPosition(NavigationLabelPosition, default: end): Label positioninglabelSize(NavigationLabelSize, default: large): Size variant for itemsselectedKey(Key?, optional): Currently selected item keyonSelected(ValueChanged<Key?>?, optional): Selection change callbackexpanded(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,
});