NavRailButton constructor

const NavRailButton({
  1. Key? key,
  2. String? label,
  3. IconData? icon,
  4. dynamic onTap()?,
  5. bool expanded = false,
  6. bool selected = false,
  7. bool showSelected = true,
  8. double? width = 0,
  9. double? height = 0,
  10. Color? selectedColor,
  11. Color? selectedBackgroundColor,
  12. Color? unselectedBackgroundColor,
  13. Color? unselectedColor,
  14. BorderRadius? borderRadius,
  15. NavRailDirection direction = NavRailDirection.vertical,
  16. NavRailButtonLabelPosition labelPosition = NavRailButtonLabelPosition.bottom,
})

Creates a NavRailButton widget.

At least one of label or icon should be provided. The onTap callback is optional but typically provided.

Implementation

const NavRailButton({
  super.key,
  super.label,
  super.icon,
  super.onTap,
  super.expanded = false,
  super.selected = false,
  super.showSelected = true,
  super.width = 0,
  super.height = 0,
  super.selectedColor,
  super.selectedBackgroundColor,
  super.unselectedBackgroundColor,
  super.unselectedColor,
  super.borderRadius,
  super.direction = NavRailDirection.vertical,
  super.labelPosition = NavRailButtonLabelPosition.bottom,
});