copyWithItems method

List<T> copyWithItems(
  1. Iterable<T> items, [
  2. bool prepend = false
])

Adds multiple items to the beginning or end of the iterable

Implementation

List<T> copyWithItems(Iterable<T> items, [bool prepend = false]) {
  return prepend ? [...items, ...this] : [...this, ...items];
}