requireConfigValue method

void requireConfigValue(
  1. String? value,
  2. String fieldName
)

Validates that a required configuration value is present.

Parameters:

  • value: The value to check
  • fieldName: Name of the field for error reporting

Throws:

Implementation

void requireConfigValue(String? value, String fieldName) {
  if (value == null || value.isEmpty) {
    throw ArgumentError('$fieldName is required but was null or empty');
  }
}