containsProperty method
Returns whether the given property key
is defined.
This is useful when optional configuration might exist.
Example:
if (resolver.containsProperty('app.debug')) {
print('Debug mode enabled');
}
Implementation
@override
bool containsProperty(String key) {
if (propertySources != null) {
for (PropertySource propertySource in propertySources!) {
if (propertySource.containsProperty(key)) {
return true;
}
}
}
return false;
}