NavRail constructor
const
NavRail({
- Key? key,
- List<
NrButtonWidget> buttons = const [], - List<
NrButtonWidget> actions = const [], - int selectedButtonIndex = 0,
- int selectedActionIndex = -1,
- int selectedSecondaryActionIndex = -1,
- bool expandable = false,
- bool expanded = false,
- double minWidth = 0,
- double maxWidth = 0,
- double minHeight = 0,
- double maxHeight = 0,
- NavRailDirection direction = NavRailDirection.vertical,
- NavRailButtonLabelPosition? labelPosition,
- Color? backgroundColor,
- Color? foregroundColor,
- Color? selectedColor,
- Color? selectedBackgroundColor,
- Color? unselectedColor,
- Color? unselectedBackgroundColor,
- bool verticleScrolling = false,
- Widget? leading,
- Widget? smallLeading,
- bool leadingOnTop = false,
- double expandableButtonHeight = 40,
- bool showActionSelectedIndex = true,
- bool showSecondaryActionSelectedIndex = true,
Creates a NavRail widget.
The buttons parameter is required. All other parameters are optional
and will use appropriate defaults.
Implementation
const NavRail({
super.key,
this.buttons = const [],
this.actions = const [],
this.selectedButtonIndex = 0,
this.selectedActionIndex = -1,
this.selectedSecondaryActionIndex = -1,
this.expandable = false,
this.expanded = false,
this.minWidth = 0,
this.maxWidth = 0,
this.minHeight = 0,
this.maxHeight = 0,
this.direction = NavRailDirection.vertical,
this.labelPosition,
this.backgroundColor,
this.foregroundColor,
this.selectedColor,
this.selectedBackgroundColor,
this.unselectedColor,
this.unselectedBackgroundColor,
this.verticleScrolling = false,
this.leading,
this.smallLeading,
this.leadingOnTop = false,
this.expandableButtonHeight = 40,
this.showActionSelectedIndex = true,
this.showSecondaryActionSelectedIndex = true,
});