setProperty method

void setProperty(
  1. String key,
  2. String value, {
  3. bool overwrite = true,
})

Sets a single property identified by key to the specified value.

If overwrite is false, existing values for the same key are preserved.

Example:

LogProperties.instance.setProperty("logging.level.core", "info");

Implementation

void setProperty(String key, String value, {bool overwrite = true}) {
  if (!overwrite && _props.containsKey(key)) return;
  _props[key] = value;
}