suggestions method
Returns a list of suggestions for the given key.
This is useful when optional configuration might exist.
Example:
final suggestions = resolver.suggestions('app.name');
Implementation
@override
List<String> suggestions(String key) {
List<String> suggestions = [];
if (propertySources != null) {
for (PropertySource propertySource in propertySources!) {
if (propertySource.name.contains(key) || propertySource.name == key) {
suggestions.add(propertySource.getName());
}
}
}
return suggestions;
}