fromBytesAsync static method
Implementation
static Future<Net> fromBytesAsync(
String framework,
Uint8List bufferModel, {
Uint8List? bufferConfig,
}) async {
bufferConfig ??= Uint8List(0);
final cFramework = framework.toNativeUtf8().cast<ffi.Char>();
final bufM = VecUChar.fromList(bufferModel);
final bufC = VecUChar.fromList(bufferConfig);
final p = calloc<cvg.Net>();
return cvRunAsync0(
(callback) => cdnn.cv_dnn_Net_readNetBytes(cFramework, bufM.ref, bufC.ref, p, callback), (c) {
calloc.free(cFramework);
final net = Net.fromPointer(p);
return c.complete(net);
});
}