addProps method
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);
}