destroyBridge method

Future destroyBridge(
  1. DestoryBridgeCallback<bool> callback,
  2. bool isReload
)

Implementation

Future<dynamic> destroyBridge(DestoryBridgeCallback<bool> callback, bool isReload) async {
  _thirdPartyAdapter?.onRuntimeDestroy();
  LogUtils.i(_kTag, "destroyBridge($_v8RuntimeId) start");
  if (_v8RuntimeId == 0) {
    LogUtils.i(_kTag, "destroyBridge($_v8RuntimeId) failed, already destroyed");
    return;
  }
  LogUtils.i(_kTag, "destroyBridge($_v8RuntimeId) call inner destroy");
  await VoltronApi.destroy(
    _engineId,
    (value) {
      onDestroy();
      callback(value == 0);
    },
    isReload,
  );
}