setOrRemoveProperty method

void setOrRemoveProperty(
  1. String propertyName,
  2. Property? property
)

Sets the given property when it is not null and otherwise removes the property with the given propertyName.

Implementation

void setOrRemoveProperty(
  final String propertyName,
  final Property? property,
) {
  if (property != null) {
    setProperty(property);
  } else {
    removeProperty(propertyName);
  }
}