addAllIf method
Adds Iterable<E> to List<E> only if condition
is true.
Implementation
void addAllIf(condition, Iterable<E> items) {
if (condition is Condition) {
condition = condition();
}
if (condition is bool && condition) {
addAll(items);
}
}