SimpleCommandLinePropertySource.named constructor

SimpleCommandLinePropertySource.named(
  1. String name,
  2. List<String> args
)

Creates a SimpleCommandLinePropertySource with a custom name.

Useful when managing multiple argument sources, e.g., merging CLI args with environment or test inputs under separate namespaces.

Example:

final source = SimpleCommandLinePropertySource.named('cli', ['--port=8080']);
print(source.name); // 'cli'

Implementation

SimpleCommandLinePropertySource.named(String name, List<String> args) : super.named(name, SimpleCommandLineArgsParser().parse(args));