memcpy method Null safety

void memcpy(
  1. int start,
  2. int length,
  3. dynamic other,
  4. [int offset = 0]
)

Copy data from other to this buffer, at start offset from the current read position, and length number of bytes. offset is the offset in other to start reading.

Implementation

void memcpy(int start, int length, dynamic other, [int offset = 0]) {
  if (other is MemPtr) {
    buffer.setRange(this.offset + start, this.offset + start + length,
        other.buffer, other.offset + offset);
  } else {
    buffer.setRange(this.offset + start, this.offset + start + length,
        other as List<int>, offset);
  }
}