NavigationItem constructor
NavigationItem({
- required String labelText,
- SlickRoute? routePath,
- IconData? iconData,
- IndicatorIcon? indicatorIcon,
- List<
NavigationItem> ? children, - List<
String> ? routePathSelection,
Implementation
NavigationItem({
required this.labelText,
this.routePath,
this.iconData,
this.indicatorIcon,
this.children,
this.routePathSelection,
}) : assert(
(routePath == null && children != null) ||
(routePath != null && children == null),
'A NavigationItem requires a routePath or children. It cannot have both.'),
assert(
routePathSelection == null ||
(routePath != null &&
routePathSelection.contains(routePath.location)),
'routePathSelection should contain its own routePath'),
assert(iconData == null || indicatorIcon == null,
'A NavigationItem cannot have both iconData and IndicatorIcon set simultaneously.');