fromWire function
Stream<DecodedWireEvent>
fromWire(
- Stream<
Map< frames, {String, dynamic> > - AgentWireProtocol? protocol,
Decodes a received frame stream. Every frame yields one DecodedWireEvent: KnownWireEvent for native events, RequestWireEvent for host-interaction requests, UnknownWireEvent for unknown kinds (the passthrough keeps the stream alive, E3).
Implementation
Stream<DecodedWireEvent> fromWire(
Stream<Map<String, dynamic>> frames, {
AgentWireProtocol? protocol,
}) {
final wire = protocol ?? AgentWireProtocol();
return frames.map(wire.decodeEvent);
}