HostEnvironment class abstract interface

Provides information about the hosting environment an application is running in.

Implementers
Available extensions

Properties

applicationName ↔ String
Gets or sets the name of the application.
getter/setter pair
contentRootFileProvider ↔ FileProvider?
Gets or sets an FileProvider pointing at contentRootPath.
getter/setter pair
contentRootPath ↔ String
Gets or sets the absolute path to the directory that contains the application content files.
getter/setter pair
environmentName ↔ String
Gets or sets the name of the environment. The host automatically sets this property to the value of the of the environment key as specified in configuration.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isDevelopment() → bool

Available on HostEnvironment, provided by the HostEnvironmentEnvExtensions extension

Checks if the current host environment name is Environments.development.
isEnvironment(String environment) → bool

Available on HostEnvironment, provided by the HostEnvironmentEnvExtensions extension

Compares the current host environment name against the specified value.
isProduction() → bool

Available on HostEnvironment, provided by the HostEnvironmentEnvExtensions extension

Checks if the current host environment name is Environments.production.
isStaging() → bool

Available on HostEnvironment, provided by the HostEnvironmentEnvExtensions extension

Checks if the current host environment name is Environments.staging.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited