detach method

Uint8List detach()

Copies the frame bytes into a fresh tightly-sized Uint8List.

Implementation

Uint8List detach() {
  _ensureValid();
  final out = Uint8List(length);
  if (length != 0) {
    out.setRange(0, length, _buffer, 0);
  }
  return out;
}