RouteInstance constructor

RouteInstance({
  1. required String routePath,
  2. required PageBuilder pageBuilder,
  3. String? title,
  4. String parameters = '',
  5. dynamic extraInformation,
  6. String childPageTitleBuilder(
    1. String parentTitle,
    2. String path
    )?,
})

Implementation

RouteInstance(
    {required this.routePath,
    required this.pageBuilder,
    String? title,
    this.parameters = '',
    this.extraInformation,
    String Function(String parentTitle, String path)? childPageTitleBuilder})
    : path = parameters == ''
          ? '/' + routePath
          : '/' + routePath + '/' + parameters,
      title = title ?? routePath,
      widget =
          AsyncLoadPage(future: pageBuilder(parameters, extraInformation)),
      childPageTitleBuilder = childPageTitleBuilder ??
          ((parameters, parentTitle) => parentTitle) {
  _routeStack[path.substring(1)] = this;
}