loadConfigIntoContainer method
void
loadConfigIntoContainer()
Loads and parses the config file, then flattens the config map and ultimately preprends "@config." to the key before adding that config item to the DI container.
Implementation
void loadConfigIntoContainer() {
var configFile = File('config.yml');
var configReader = ConfigReader(file: configFile)..read();
var config = configReader.parsed;
var flat = flatten(config);
flat.entries.forEach((element) {
container?.bind('@config.'+element.key, (_) => element.value);
});
}