modifyProps method
Allows modifier
to alter the instance if shouldModify
is true.
Is a noop if shouldModify
is false
or modifier
is null
.
Related: addProps
Implementation
void modifyProps(PropsModifier? modifier, [bool shouldModify = true]) {
if (!shouldModify || modifier == null) return;
modifier(this);
}