ViewerBridge class

Codec + event stream for the viewer bridge.

Keeps no webview reference: engines receive messages through accept and the controller sends commands straight through its engines (bridge.javaScriptFor builds the expression).

Constructors

ViewerBridge()

Properties

events → Stream<ViewerEvent>
Stream of typed viewer events.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

accept(Object payload, {int source = 0}) → void
Accepts a raw message from a JavaScript channel: a JSON string (webview_flutter) or an already-decoded map (inappwebview).
dispose() → Future<void>
Closes the event stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

javaScriptFor(Map<String, Object?> message) → String
Builds the JavaScript expression delivering message to the page controller.