Hosts class
Hosts config.
- Annotations
-
- @immutable
Constructors
- Hosts()
-
Creates default hosts config.
const
-
Hosts.multiple({List<
ApiHost> api = defaultApiHosts, List<ImageHost> image = defaultImageHosts, List<ThumbnailHost> thumbnail = defaultThumbnailHosts}) - Creates a hosts config with multiple host of each type.
- Hosts.only({ApiHost api = defaultApiHost, ImageHost image = defaultImageHost, ThumbnailHost thumbnail = defaultThumbnailHost})
- Creates a hosts config with one host of each type.
Properties
- api → ApiHost
-
Preferred API host.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hosts
→ Map<
HostType, List< Host> > -
Hosts map.
final
- image → ImageHost
-
Preferred image host.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thumbnail → ThumbnailHost
-
Preferred thumbnail host.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
selectHost<
T extends Host> (HostType type, List< T> hosts) → T -
Returns preferred host of given
type
fromhosts
list. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
HostType type) → Host -
Returns preferred host of given
type
.
Constants
- defaultApiHost → const ApiHost
- Default API host.
-
defaultApiHosts
→ const List<
ApiHost> - Default API hosts.
- defaultImageHost → const ImageHost
- Default image host.
-
defaultImageHosts
→ const List<
ImageHost> - Default image hosts.
- defaultThumbnailHost → const ThumbnailHost
- Default thumbnail host.
-
defaultThumbnailHosts
→ const List<
ThumbnailHost> - Default thumbnail hosts.