WasmEngine.configured constructor

WasmEngine.configured(
  1. void configure(
    1. WasmConfig config
    )
)

An engine built from a WasmConfig that configure fills in.

Implementation

factory WasmEngine.configured(void Function(WasmConfig config) configure) {
  final config = WasmConfig();
  try {
    configure(config);
    return WasmEngine._withConfig(config);
  } catch (_) {
    config.dispose();
    rethrow;
  }
}