【发布时间】:2020-04-12 19:23:12
【问题描述】:
我是这样做的:
Pointer<Uint8> _byteDataToPointer(ByteData byteData) {
final uint8List = byteData.buffer.asUint8List();
final length = uint8List.lengthInBytes;
final result = allocate<Uint8>(count: length);
for (var i = 0; i < length; ++i) {
result[i] = uint8List[i];
}
return result;
}
在JNI中有没有像JNIEnv::GetByteArrayRegion这样更高效的方式?
非常感谢!
【问题讨论】:
标签: c++ flutter dart flutter-desktop