PropertySources constructor

const PropertySources()

A collection of PropertySources that provides lookup and stream support.

This abstract class is used in the JetLeaf environment system to hold multiple PropertySource instances, such as system environment variables, command-line arguments, or custom maps.

You can use this class to:

  • Stream through all available property sources
  • Check whether a named property source exists
  • Retrieve a property source by name

Example usage:

final sources = MyPropertySources(); // your custom implementation
if (sources.contains('systemEnv')) {
  final envSource = sources.get('systemEnv');
  print(envSource?.getProperty('HOME'));
}

Subclasses must implement the contains and get methods to define how sources are stored and accessed.

Implementation

const PropertySources();