EventFlux class
A class for managing event-driven data streams using Server-Sent Events (SSE).
EventFlux
facilitates the connection, disconnection, and management of SSE streams.
It implements the Singleton pattern to ensure a single instance handles SSE streams throughout the application.
- Inheritance
-
- Object
- EventFluxBase
- EventFlux
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
-
connect(
EventFluxConnectionType type, String url, {Map< String, String> header = const {'Accept' : 'text/event-stream'}, dynamic onConnectionClose()?, bool autoReconnect = false, ReconnectConfig? reconnectConfig, required dynamic onSuccessCallback(EventFluxResponse?), dynamic onError(EventFluxException)?, HttpClientAdapter? httpClient, Map<String, dynamic> ? body, String? tag, bool logReceivedData = false, List<MultipartFile> ? files, bool multipartRequest = false}) → void -
Establishes a connection to a server-sent event (SSE) stream.
override
-
disconnect(
) → Future< EventFluxStatus> -
Disconnects from the event stream.
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