dvNavigatorPages function
For Navigator 2.0: the page for location from the app's route table,
the first entry that matches, or none -- what goes into the navigator's
pages after the app's own base pages.
Implementation
List<Page<Object?>> dvNavigatorPages(
Uri location,
Iterable<DVNavigatorRoute> table,
) {
for (final DVNavigatorRoute route in table) {
if (route.matches(location)) return <Page<Object?>>[route.page(location)];
}
return const <Page<Object?>>[];
}