getRequiredProperty method

  1. @override
String getRequiredProperty(
  1. String key
)
override

Returns the property value for key, or throws IllegalStateException if the property is not defined.

This is useful for required configuration values such as API keys.

Example:

final apiKey = resolver.getRequiredProperty('security.apiKey');

Implementation

@override
String getRequiredProperty(String key) {
		String? value = getProperty(key);
		if (value == null) {
			throw IllegalStateException("Required key '$key' not found");
		}
		return value;
	}