RouteDefinition constructor
RouteDefinition(
- String path,
- RouteWidgetBuilder widgetBuilder, {
- String? name,
- RouterPageBuilder pageBuilder = defaultPageBuilder,
- List<
Middleware> middlewares()?,
Creates a RouteDefinition.
For a dialog, isDialog
must be true to work properly.
Implementation
RouteDefinition(
String path,
this.widgetBuilder, {
this.name,
this.pageBuilder = defaultPageBuilder,
List<Middleware> Function()? middlewares,
}) : _path = _addTrailingSlash(path),
_middlewares = middlewares {
_parametersNames = [];
_pathRegex = pathToRegExp(
_path,
parameters: _parametersNames,
caseSensitive: false,
);
}