addNonNull method
void
addNonNull(
- E? item
Add item
to List<E> only if item
is not null.
If item
is not null, it is added to the list.
Implementation
void addNonNull(E? item) {
if (item != null) {
add(item);
}
}