BridgeFrame class final

One decoded wire frame. v/id/op are pulled out of fields; the rest of the payload stays addressable there.

Constructors

BridgeFrame({required String id, required String op, Map<String, dynamic>? fields})

Properties

fields Map<String, dynamic>
Remaining payload fields (without v/id/op).
final
hashCode int
The hash code for this object.
no setterinherited
id String
Correlation id: echoed by replies (pong/acked/welcome/error), fresh per request (mail, browserReq).
final
op String
The op name (BridgeOps).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encode() String
Encodes to the JSON text sent over the WebSocket.
map(String key) Map<String, dynamic>?
An object payload field, null when absent or not an object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
str(String key) String?
A string payload field, null when absent or not a string.
toJson() Map<String, dynamic>
Wire form: payload fields first, then the envelope keys — v/id/ op are RESERVED: a payload field reusing one is shadowed on the wire, never allowed to corrupt the envelope.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

decode(String text) BridgeFrame
Strict decode: throws BridgeProtocolException on a non-JSON-object body or a missing/mismatching v/id/op. Unknown ops decode fine — the caller answers those with BridgeErrorCode.badOp.