callNative function
void
callNative()
Implementation
void callNative(
int engineId,
Pointer<Utf16> moduleNamePtr,
Pointer<Utf16> moduleFuncPtr,
Pointer<Utf16> callIdPtr,
Pointer<Void> paramsDataPtr,
int paramsLen,
int bridgeParamJsonInt,
) {
var bridgeParamJson = bridgeParamJsonInt == 1;
var moduleName = moduleNamePtr.toDartString();
var moduleFunc = moduleFuncPtr.toDartString();
var callId = callIdPtr.toDartString();
var dataList = paramsDataPtr.cast<Uint8>().asTypedList(paramsLen);
final bridge = VoltronBridgeManager.bridgeMap[engineId];
if (bridge != null) {
bridge.callNatives(
moduleName,
moduleFunc,
callId,
dataList,
bridgeParamJson,
);
}
}