addAll method

void addAll(
  1. Iterable<int> iterable
)

Appends all objects of iterable to the end of this NSMutableData.

The elements of the iterable should be integers in the range 0 to 255. Any integer, which is not in that range, is converted to a byte as if by value.toUnsigned(8).

Implementation

void addAll(Iterable<int> iterable) {
  final f = malloc<Uint8>(iterable.length);
  try {
    f.asTypedList(iterable.length).setAll(0, iterable);
    appendBytes(f.cast(), length: iterable.length);
  } finally {
    malloc.free(f);
  }
}