cut method

RouteNode<RouteValue>? cut(
  1. Object key
)

Returns a copy of the list from the node it's called on, up to the node with the provided key

Implementation

RouteNode? cut(Object key) {
  if (key == this.key) {
    return null;
  }
  return route.updateWithNext(next: next?.cut(key), value: value);
}