AppConfigService class

Writes the generated config class (generated mode) for a client.

Constructors

AppConfigService(String projectDir, ConfigService config)

Properties

config → ConfigService
final
hashCode → int
The hash code for this object.
no setterinherited
outputFile → File
no setter
projectDir → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settings → AppConfigSettings
final

Methods

allEnvFiles() → List<File>
Every client's .env and .env_test: the class must have the same fields no matter which client or environment it was generated for.
appValues(Map<String, String> values) → Map<String, String>
Keys compiled into the app for values: everything except excluded ones.
ensureOutputTracked() → Future<bool>
When git ignores the generated file, appends !<output> to .gitignore so it gets committed. Returns false when it is still ignored afterwards (e.g. a rule in a nested .gitignore).
generateSource({required String client, required File envFile, required bool isTest}) → String
Generates the source for client from envFile.
isOutputGitIgnored() → bool
Whether git ignores the generated file, typically through a **/*.g.dart rule meant for build_runner output. Then the class is never committed and fresh clones don't compile. False outside git.
isStagedRootEnv() → bool
Whether the root .env was written by udara_cli (the staged native file, or a copy of a client's .env), so clean may delete it.
keysMissingFromInclude() → List<String>
Keys some client's .env / .env_test defines that don't reach the app only because app_config.include doesn't list them (build-only exclude keys aren't reported). Empty without an include list.
nativeEnvReaders() → Map<String, List<String>>
Native build files that read the root .env (e.g. a Gradle signing config), with the keys they read when that can be seen. When there are none, generated mode never writes a root .env at all.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
write({required String client, required File envFile, required bool isTest, bool trackForCleanup = true}) → Future<File>
Writes the class for client. With trackForCleanup the previous file (normally the committed default) is backed up, or recorded as created, so the build's cleanup puts it back.

Operators

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