NavigationItem constructor

NavigationItem({
  1. required String labelText,
  2. SlickRoute? routePath,
  3. IconData? iconData,
  4. IndicatorIcon? indicatorIcon,
  5. List<NavigationItem>? children,
  6. 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.');