load method

Future<void> load()

Implementation

Future<void> load() async {
  try {
    final configFile = File(Constants.automateConfigFilePath);
    if (!configFile.existsSync()) {
      throw Exception(
        'automate_config.json not found in the automate directory',
      );
    }
    final configContent = await configFile.readAsString();
    _config = jsonDecode(configContent) as Map<String, dynamic>;
  } on Exception {
    rethrow;
  }
}