getProperty method
Retrieves the value for the given property key
, or null
if not found.
If defaultValue
is provided, it returns the default value instead of null.
Equivalent to: getProperty(key) ?? defaultValue
.
Example:
final dbUrl = resolver.getProperty('database.url');
final dbUrl = resolver.getProperty('database.url', 'localhost');
See also:
getPropertyWithDefault
- getRequiredProperty
Implementation
@override
String? getProperty(String key, [String? defaultValue]) {
return _propertyResolver.getProperty(key, defaultValue);
}