ConstWhether the bridge is initialized and ready
Whether running inside Flutter WebView
Initialize or reinitialize the communication bridge. Automatically called on first import if running in Flutter WebView. Call this manually after destroy() to reactivate the bridge.
Send an async message to Flutter and wait for response.
The message to send
Promise resolving to the response
Send a fire-and-forget message to Flutter.
The message to send
Add an event listener for a specific event/action from Flutter.
The event name to listen for
The callback function
Remove a specific event listener.
The event name
The callback function to remove
Remove all event listeners for specific event(s).
Comma-separated list of event names
Clean up all resources to prevent memory leaks. Call this when the bridge is no longer needed.
Shared communication module for Flutter WebView bridge.