SSEResponse class
A class representing a Server-Sent Events (SSE) response.
Constructors
- SSEResponse(String id, String event, String comment, dynamic data, String rawResponse)
-
Constructs an SSEResponse instance.
const
- SSEResponse.empty()
-
Creates an empty SSEResponse instance.
factory
- SSEResponse.parse(String rawResponse)
-
Parses a raw SSE response string and returns an SSEResponse instance.
factory
- SSEResponse.raw(String rawResponse)
-
Creates an SSEResponse instance with the raw response string.
factory
Properties
- comment → String
-
The comment associated with the SSE event.
final
- data → dynamic
-
The data payload of the SSE event.
final
- event → String
-
The type of the SSE event.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The ID of the SSE event.
final
- rawResponse → String
-
The raw response string of the SSE event.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited