Environment class

A value object representing the current application environment.

Built-in values are available through Environment.debug and Environment.normal, but custom values can be created for app-specific environments such as staging.

Constructors

Environment(String name)
Creates an environment with a human-readable name.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
isDebug bool
Returns true when this environment is the built-in debug environment.
no setter
isNormal bool
Returns true when this environment is the built-in normal environment.
no setter
name String
Human-readable environment name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

debug → const Environment
Built-in debug environment for development and testing purposes.
normal → const Environment
Built-in normal environment for production use.