RouteDefiner<T> constructor
- required String path,
- required Widget builder(),
- List<
RouteGuard> guards = const [], - Map<
String, Object> ? data, - FutureOr<
String> title()?, - RouteOptions? options,
- DefinedRouteFactory? routeFactory,
- DefinedPageRouteFactory? pageRouteFactory,
Implementation
RouteDefiner({
required this.path,
required this.builder,
List<RouteGuard> guards = const [],
Map<String, Object>? data,
this.title,
this.options,
this.routeFactory,
this.pageRouteFactory,
}) : guards = List.unmodifiable(guards),
data = data == null ? null : Map.unmodifiable(data),
pattern = RoutePattern(path) {
if (routeFactory != null && pageRouteFactory != null) {
throw ArgumentError('Specify only one route factory per definition.');
}
}