InjectEnvVar class final
Writes a key-value pair to the project's .env file.
The file is treated as a Flutter asset (per the project's pubspec.yaml
convention) so the entry is appended in KEY=value format.
Example
InjectEnvVar(key: 'API_KEY', value: 'secret123')
- Inheritance
-
- Object
- InstallOperation
- InjectEnvVar
Constructors
- InjectEnvVar({required String key, required String value, String? comment})
-
Creates an InjectEnvVar operation.
const
Properties
- comment → String?
-
Optional single-line comment text (without the leading
#). When non-null, the dispatcher writes# <comment>immediately above theKEY=VALUEline via EnvEditor.setKey. Carries through to the install record so uninstall + diagnostics retain the original intent.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
Environment variable name (upper-snake-case by convention).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The value to write.
final
Methods
-
describe(
) → String -
Returns a human-readable dry-run line for this operation.
override
-
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