RouteBuilder<T extends RouteArguments> constructor

RouteBuilder<T extends RouteArguments>({
  1. required PathsBuilder getBuilder(),
  2. required RegExp pattern,
  3. required T parse(
    1. RouteSegments,
    2. RouteParameters
    ),
  4. required String path(
    1. T
    ),
  5. ViewModelWidget<ViewModel> buildView()?,
  6. Future<Widget> build(
    1. BuildContext,
    2. T
    )?,
  7. required Future<RoutePath<RouteArguments>?> rewrite(
    1. BuildContext,
    2. T
    ),
  8. AccessMode accessMode = AccessMode.public,
  9. RoutePath<RouteArguments> previousPath(
    1. T
    )?,
  10. List<NavigationItem> menuItems()?,
  11. List<NavigationItem> tabItems()?,
  12. bool isPublicRoute = false,
})

Implementation

RouteBuilder({
  required this.getBuilder,
  required this.pattern,
  required this.parse,
  required this.path,
  this.buildView,
  this.build,
  required this.rewrite,
  this.accessMode = AccessMode.public,
  this.previousPath,
  this.menuItems,
  this.tabItems,
  this.isPublicRoute = false,
}) : assert(((build != null && buildView == null) ||
          (buildView != null && build == null)));