NavigationRailDestination constructor

const NavigationRailDestination({
  1. required Widget icon,
  2. Widget? selectedIcon,
  3. Color? indicatorColor,
  4. ShapeBorder? indicatorShape,
  5. required Widget label,
  6. EdgeInsetsGeometry? padding,
  7. bool disabled = false,
})

Creates a destination that is used with NavigationRail.destinations.

When the NavigationRail.labelType is NavigationRailLabelType.none, the label is still used for semantics, and may still be used if NavigationRail.extended is true.

Implementation

const NavigationRailDestination({
  required this.icon,
  Widget? selectedIcon,
  this.indicatorColor,
  this.indicatorShape,
  required this.label,
  this.padding,
  this.disabled = false,
}) : selectedIcon = selectedIcon ?? icon;