List<T?>? addIf(List<T> from, bool Function(T element) test) { var index = 0; while (index < length) { if (test(from[index])) { add(from[index]); } index++; } return this; }