Host constructor
Creates host config of corresponding type
.
Implementation
factory Host(HostType type,
String authority, [
bool ssl = true,
]
) {
switch (type) {
case HostType.api:
return ApiHost(authority, ssl);
case HostType.image:
return ImageHost(authority, ssl);
case HostType.thumbnail:
return ThumbnailHost(authority, ssl);
}
}