addProps method

void addProps(
  1. Map? propMap, [
  2. bool shouldAdd = true
])

Adds an arbitrary propMap of arbitrary props if shouldAdd is true.

Is a noop if shouldAdd is false or propMap is null.

Related: addProp, modifyProps

Implementation

void addProps(Map? propMap, [bool shouldAdd = true]) {
  if (!shouldAdd || propMap == null) return;

  this.addAll(propMap);
}