Source
APIHost.fromURI(Uri uri) {
host = uri.host;
basePath = uri.path ?? "/";
if (uri.hasScheme) {
scheme = uri.scheme;
} else {
scheme = "http";
}
if (uri.hasPort) {
port = uri.port;
}
}
APIHost.fromURI(Uri uri) {
host = uri.host;
basePath = uri.path ?? "/";
if (uri.hasScheme) {
scheme = uri.scheme;
} else {
scheme = "http";
}
if (uri.hasPort) {
port = uri.port;
}
}