addAll method

  1. @override
void addAll(
  1. Iterable<int> values,
  2. [int start = 0,
  3. int? end]
)
inherited

Appends all objects of values to the end of this buffer.

This adds values from start (inclusive) to end (exclusive) in values. If end is omitted, it defaults to adding all elements of values after start.

The start value must be non-negative. The values iterable must have at least start elements, and if end is specified, it must be greater than or equal to start and values must have at least end elements.

Implementation

@override
void addAll(Iterable<E> values, [int start = 0, int? end]) {
  RangeError.checkNotNegative(start, 'start');
  if (end != null && start > end) {
    throw RangeError.range(end, start, null, 'end');
  }

  _addAll(values, start, end);
}