setProperties method

void setProperties(
  1. Map<String, String> map, {
  2. bool overwrite = true,
})

Performs a bulk update of properties using a map of key–value pairs.

  • If overwrite is false, existing properties are not replaced.
  • This is a convenient way to inject a batch of configuration settings.

Example:

LogProperties.instance.setProperties({
  "logging.level.core": "debug",
  "logging.level.network": "warn",
});

Implementation

void setProperties(Map<String, String> map, {bool overwrite = true}) {
  for (final e in map.entries) {
    setProperty(e.key, e.value, overwrite: overwrite);
  }
}