copyToNativePointer method
Copy the Uint8List into a freshly allocated Pointer<Uint8>.
Implementation
Pointer<Uint8> copyToNativePointer() {
final Pointer<Uint8> ptr = malloc<Uint8>(length);
final Uint8List view = ptr.asTypedList(length);
view.setAll(0, this);
return ptr;
}