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
.envand.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.gitignoreso 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
clientfromenvFile. -
isOutputGitIgnored(
) → bool -
Whether git ignores the generated file, typically through a
**/*.g.dartrule 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
.envwas written by udara_cli (the staged native file, or a copy of a client's.env), socleanmay delete it. -
keysMissingFromInclude(
) → List< String> -
Keys some client's
.env/.env_testdefines that don't reach the app only becauseapp_config.includedoesn't list them (build-onlyexcludekeys 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.envat 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. WithtrackForCleanupthe 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