Skip to content

Flutter ​

Flutter WebView — load HTML that mounts the editor, then Native bridge.

ts
import { bindHostBridge } from '@codemerge/integrate/protocol';

bindHostBridge(document.getElementById('editor')!, {
  targetOrigin: '*', // tighten in production
});

Dart shell: postMessage({ type: 'ocm-load', value }), listen for ocm-change / ocm-ready, send ocm-destroy on teardown.

Released under the MIT License.