toUint8List method

Uint8List? toUint8List([
  1. int offset = 0
])

This assumes buffer is a Typed

Implementation

Uint8List? toUint8List([int offset = 0]) {
  if (buffer is TypedData) {
    final b = buffer as TypedData;
    return Uint8List.view(b.buffer, b.offsetInBytes + this.offset + offset);
  }
  return null;
}