toEnvironmentMap method

Map<String, String> toEnvironmentMap({
  1. bool skipDotiableKeys = true,
})

Returns ENV parts of KV.

Implementation

Map<String, String> toEnvironmentMap({bool skipDotiableKeys = true}) {
  final entries = sources.entries
      .where((e) => _envPartMatcher(e, skipDotiableKeys))
      .map((e) => MapEntry(e.key, e.value.toString()));
  final environment = Map.fromEntries(entries);

  return Map.unmodifiable(environment);
}