ConfigService class

Constructors

ConfigService(String projectDir)

Properties

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

Methods

addInitialAssetEntries() Future<void>
copyToRootEnv(File sourceEnv, {bool isTest = false}) 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. Returns the backup file.
getPubspecVersion() Future<String>
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.
restoreBackup(File originalFile) Future<void>
Restores a file from its .bak version and deletes the backup.
toString() String
A string representation of this object.
inherited
updatePubspecAssets({required String clientAssetPath, required List<String> requiredExtraAssets}) Future<void>
Specifically handles the complex 'assets' list in pubspec.yaml
updateYamlValue(File yamlFile, List<Object> path, Object newValue) Future<void>
Safely updates a value in a YAML file using YamlEditor. This 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
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)