Subclasses may override this method to read from something that is not a Map.
Sometimes a configuration value can be represented in multiple ways. For example, a DatabaseConnectionConfiguration
can be a Map
of each component or a single URI String
that can be decomposed into each component. Subclasses may override
this method to provide this type of behavior. This method is executed when an instance of ConfigurationItem is ready to be parsed,
but the value from the YAML is not a Map
. By default, this method throws an exception.
Source
void decode(dynamic anything) { throw new ConfigurationException("${this.runtimeType} attempted to decode value $anything, but did not override decode."); }