Returns the stateful navigation branch for a route, if any.
typedef RouteBranch<T extends Object> = String? Function(T route);