createNode method

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

Implementation

@override
RouteNode createNode({RouteNode? next, T? value}) {
  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,
  );
}