ConfigService class

Constructors

ConfigService(String projectDir)

Properties

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

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, required List<String> requiredExtraAssets}) → 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.

Operators

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

Static Methods

getConfigValue<T>(String key) → Future<T?>
Get a specific config value
getSlackBotToken() → Future<String?>
Get Slack bot token
isSlackConfigured() → Future<bool>
Check if Slack is configured
loadConfig() → Future<Map<String, dynamic>>
Load configuration from file
parseEnvContent(String content, {String sourceName = '.env'}) → Map<String, String>
Pure parser behind parseEnvFile; exposed for testing.
removeSlackConfig() → Future<void>
Remove Slack configuration
saveConfig(Map<String, dynamic> config) → Future<void>
Save configuration to file
setConfigValue(String key, dynamic value) → Future<void>
Set a specific config value
setSlackBotToken(String token) → Future<void>
Set Slack bot token
showConfig() → Future<void>
Show current configuration (without sensitive data)

Constants

defaultClientEnvAsset → const String
The env file the app loads at runtime when nothing is passed via --dart-define=CLIENT_ENV. Registered as an asset by setup.
historyFileName → const String