remove method

PropertySource? remove(
  1. String name
)

Removes the PropertySource with the given name, if present.

Returns the removed source or null if not found.

Example:

final removed = sources.remove('env');

Implementation

PropertySource? remove(String name) {
  return synchronized(_sources, () {
    int index = _sources.indexOf(PropertySource.namedStatic(name));
    return (index != -1 ? _sources.removeAt(index) : null);
  });
}