addIf method

void addIf(
  1. dynamic condition,
  2. K key,
  3. V value
)

Implementation

void addIf(dynamic condition, K key, V value) {
  if (condition is Condition) condition = condition();
  if (condition is bool && condition) {
    this[key] = value;
  }
}