PlatformEnvironmentSource constructor

PlatformEnvironmentSource({
  1. String prefix = '',
  2. String separator = '__',
  3. Map<String, String>? environment,
})

Uses Platform.environment unless a test/application environment is given.

Implementation

PlatformEnvironmentSource({
  this.prefix = '',
  this.separator = '__',
  Map<String, String>? environment,
}) : _environment =
          environment == null ? null : Map.unmodifiable(environment) {
  if (separator.isEmpty) throw ArgumentError('Separator must not be empty.');
}