createNode method

  1. @override
RouteNode<RouteValue> createNode({
  1. RouteNode<RouteValue>? next,
  2. T? value,
  3. Completer? popCompleter,
})
override

Implementation

@override
RouteNode createNode({
  RouteNode? next,
  T? value,
  Completer? popCompleter,
}) {
  value ??= defaultValue;

  if (value == null) {
    throw HyperError("No value provided for ValueRoute<$key>");
  }

  return ValueNode(
    buildPage: (context) => buildPage(context, value!),
    next: next,
    value: value,
    urlParser: urlParser,
    route: this,
    popCompleter: popCompleter,
  );
}