initJsFrameWork static method

Future<int> initJsFrameWork({
  1. String globalConfig = '',
  2. bool singleThreadMode = false,
  3. bool isDevModule = false,
  4. required int groupId,
  5. required bool isReload,
  6. required int engineId,
  7. required int vfsId,
  8. required int domId,
  9. required CommonCallback callback,
  10. required int devtoolsId,
})

Implementation

static Future<int> initJsFrameWork({
  String globalConfig = '',
  bool singleThreadMode = false,
  bool isDevModule = false,
  required int groupId,
  required bool isReload,
  required int engineId,
  required int vfsId,
  required int domId,
  required CommonCallback callback,
  required int devtoolsId,
}) async {
  var globalConfigPtr = globalConfig.toNativeUtf16();
  globalConfig.toNativeUtf16();
  var result = _BridgeFFIManager.instance.initJsFramework(
    globalConfigPtr,
    singleThreadMode ? 1 : 0,
    enableVoltronBuffer ? 0 : 1,
    isDevModule ? 1 : 0,
    groupId,
    vfsId,
    FfiManager().id,
    domId,
    engineId,
    generateCallback(
      (value) {
        callback(value);
      },
    ),
    devtoolsId,
    isReload ? 1 : 0,
  );
  free(globalConfigPtr);
  return result;
}