addAllToList function

void addAllToList(
  1. List list,
  2. Object? values
)

Adds all values to list.

Implementation

void addAllToList(List list, Object? values) {
  if (values == null) return;

  if (values is List) {
    list.addAll(values);
  } else {
    list.add(values);
  }
}