StreamEventTransformer class
A stream transformer that converts a stream of ServerSentEvents into a stream of StreamEvents, decoding the event types used by firebase.
Note: Typically, you would use RestApi.stream instead of using this class directly.
If any events are received that are not known by this library, a UnknownStreamEventError is thrown. As this is an error, this should never happen, unless firebase decides to change how their APIs work.
- Implemented types
Constructors
- StreamEventTransformer.new()
-
Default constructor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
Stream< ServerSentEvent> stream) → Stream<StreamEvent> -
Transforms the provided
stream
.override -
cast<
RS, RT> () → StreamTransformer< RS, RT> -
Provides a
StreamTransformer<RS, RT>
view of this stream transformer.override -
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
Constants
-
eventTypes
→ const List<
String> - All the SSE event types that are consumed by this transformer.