NavigationRailDestination constructor Null safety
- {required Widget icon,
- Widget? selectedIcon,
- required Widget label,
- EdgeInsetsGeometry? padding}
Creates a destination that is used with NavigationRail.destinations.
icon and label must be non-null. 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,
required this.label,
this.padding,
}) : selectedIcon = selectedIcon ?? icon,
assert(icon != null),
assert(label != null);