SseStreamParserSink class final
Raw SSE response event parser to Map<String, dynamic>.
For more information about the SSE protocol, refer to the documentation: https://html.spec.whatwg.org/multipage/server-sent-events.html
- Inheritance
-
- Object
- EventSinkTransformer<
String, Map< String, dynamic> > - SseStreamParserSink
Constructors
-
SseStreamParserSink(EventSink<
Map< outputSink)String, dynamic> > -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
outputSink
→ EventSink<
Map< String, dynamic> > -
The output sink to which transformed events are added.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
String event) → void -
Adds a parsed SSE event to the output sink as a map.
override
-
addError(
Object e, [StackTrace? st]) → void -
Adds an
errorto the sink.inherited -
addToSink(
Map< String, dynamic> event) → void -
Adds a transformed event to the output sink.
inherited
-
close(
) → void -
Closes the sink.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseSse(
String event) → Map< String, dynamic> - Parses a raw SSE event string into a map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited