Environment<T> class
Properties
-
config
→ T
-
A getter that returns the current environment config.
no setter
-
currentEnvironmentType
→ Enum
-
A getter that returns the current environment type.
no setter
-
debugOptions
→ DebugOptions
-
A getter that returns the current debug options.
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
isDebug
→ bool
-
A getter that returns a boolean value. When current environment is development a getter returned true.
no setter
-
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.
inherited
Static Methods
-
init<T>({required EnvironmentType environmentType, required T config, DebugOptions debugOptions = const DebugOptions()})
→ void
-
Initialize the environment from configuration model and store it in entrypoint file.
-
initFromJson<T>({required EnvironmentType environmentType, required T fromJson(Map<String, dynamic> data), DebugOptions debugOptions = const DebugOptions()})
→ Future<void>
-
Initialize the environment from file with JSON type in the assets folder.
-
initFromJsonWithCustomType<T, D extends Enum>({required D environmentType, required T fromJson(Map<String, dynamic> data), DebugOptions debugOptions = const DebugOptions()})
→ Future<void>
-
Initialize the custom environment from file with JSON type in the assets folder.
-
initWithCustomType<T, D extends Enum>({required D environmentType, required T config, DebugOptions debugOptions = const DebugOptions()})
→ void
-
Initialize the environment from configuration model with custom EnvironmentType and store it in entrypoint file.