Link.split constructor
Create a Link which routes to the left
link if test
returns true
.
Otherwise it routes to the right
link, which defaults to passthrough.
Implementation
factory Link.split(
bool Function(Request request) test,
Link left, [
Link right = const PassthroughLink(),
]) =>
_RouterLink((Request request) => test(request) ? left : right);