SseConnection class abstract
Abstract contract for an SSE connection.
Implementations:
- HttpSseClient —
package:http(Dart VM + Flutter + web).
- Implementers
Constructors
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
-
close(
) → Future< void> - Closes the active connection (if any). The next connect call will open a fresh one.
-
connect(
Uri url, {Map< String, String> ? headers, String? lastEventId}) → Stream<SseEvent> -
Opens a connection to
urland returns a stream of SseEvents. The stream ends when the server closes the connection. ThelastEventIdis sent as theLast-Event-IDheader (so the server can resume from where we left off). -
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