add method

void add(
  1. List<int> bytes
)

Appends bytes to the current contents of this builder.

Each value of bytes will be truncated to an 8-bit value in the range 0 .. 255.

Implementation

void add(List<int> bytes) {
  _length += bytes.length;
  if (_copy) {
    final copy = Uint8List(bytes.length);
    copy.setRange(0, bytes.length, bytes);
    _chunks.add(copy);
  } else {
    _chunks.add(bytes);
  }
}