createLoaderManager static method

VoltronJSLoaderManager createLoaderManager(
  1. EngineInitParams params,
  2. EngineListener listener
)

Implementation

static VoltronJSLoaderManager createLoaderManager(
  EngineInitParams params,
  EngineListener listener,
) {
  // create voltron engine
  var render = VoltronJSLoaderManager._internal(params);
  // init voltron engine
  render._init((status, msg) {
    LogUtils.i("flutter_render", "init engine status($status), msg($msg)");
    listener(status, msg);
    // engine初始化成功
    if (render.pendingExecutor.isNotEmpty) {
      for (var executor in render.pendingExecutor) {
        executor();
      }
    }
    render.pendingExecutor.clear();
  });
  return render;
}