loadConfig static method
Loads configuration from file.
Implementation
static Config? loadConfig() {
try {
final configPath = getConfigPath();
if (!PathUtils.isFile(configPath)) {
return null;
}
final file = File(configPath);
final content = file.readAsStringSync();
final json = jsonDecode(content) as Map<String, dynamic>;
return Config.fromJson(json);
} catch (e) {
return null;
}
}