ConfigService class
Methods
addInitialAssetEntries ()
→ Future <void >
Registers the default client's env file as a Flutter asset so the app
can load it when no CLIENT_ENV is passed.
appendBuildHistory ({required String client , required String platform , required String type , required String ? version , required bool success , required Duration duration , String ? errorMessage , String ? artifactPath })
→ Future <void >
Appends a build record to the project-local history file, keeping only
the most recent _maxHistoryEntries. Newest entries are stored first.
clearBackups ()
→ Future <void >
clearBuildHistory ()
→ Future <bool >
Deletes the build history file. Returns true if a file was removed.
copyToRootEnv (File sourceEnv , {bool trackForCleanup = true })
→ Future <File >
Copies a client env file to the root .env for the Flutter build.
createBackup (File file )
→ Future <File >
Creates a backup of a file under .udara/backups. Returns the backup.
ensureGitignoreEntries (List <String > entries )
→ Future <void >
Appends entries to the project's .gitignore when they are not already
present. Creates the file if needed.
getPubspecVersion ()
→ Future <String >
hasBackup (File file )
→ bool
Whether a backup exists for file.
loadBuildHistory ()
→ Future <List <Map <String , dynamic > > >
Loads recorded build history, newest first. Returns an empty list if
no history file exists yet.
markCreated (File file )
→ Future <void >
Records that the CLI created file from scratch, so cleanup can remove
it instead of restoring a backup.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseEnvFile (File envFile )
→ Future <Map <String , String > >
Parses an environment file into a Map.
removeCreatedFiles ()
→ Future <void >
Removes every file recorded via markCreated and clears the markers.
restoreBackup (File originalFile )
→ Future <void >
Restores a file from its backup and deletes the backup. No-op when no
backup exists.
toString ()
→ String
A string representation of this object.
inherited
updateDevelopmentTeam ({required String teamId })
→ void
Rewrites every DEVELOPMENT_TEAM entry in the iOS project file.
updatePubspecAssets ({required String clientAssetPath , })
→ Future <void >
Rewrites the flutter.assets list in pubspec.yaml so that exactly one
branding folder (the active client's) and the runtime env file are
registered. The default client's fallback env entry is preserved.
updatePubspecFonts (List fontList )
→ Future <void >
updateYamlValue (File yamlFile , List <Object > path , Object newValue )
→ Future <void >
Safely updates a value in a YAML file using YamlEditor.
Preserves comments and formatting.