webModule static method

NitroWasmModule webModule(
  1. String libName
)

Returns the loaded module for libName, or throws with the fix.

Implementation

static NitroWasmModule webModule(String libName) {
  final module = _moduleCache[libName];
  if (module == null) {
    throw StateError(
      '$libName: WASM module not loaded yet. On web, await the generated '
      "ensure<Class>Ready() (or NitroRuntime.loadWebModule('$libName', ...)) "
      'before constructing the bridge — module instantiation is asynchronous '
      'in the browser.',
    );
  }
  return module;
}