dvUseHosts function
Installs hosts for this page. host is the host it was loaded from,
Uri.base.host on the web when not given. An unknown host is the
primary, as it is on the server.
Off the web no host served the application, and the table is not used: a link to a route stays a route of this app rather than a URL handed to a browser.
Implementation
void dvUseHosts(DVHosts hosts, {String? host}) {
final String? served = host ?? (kIsWeb ? Uri.base.host : null);
if (hosts.isEmpty || served == null) {
dvResetHosts();
return;
}
_hosts = hosts;
_current = hosts.matchOrPrimary(served);
}