AlphaXSseEvent class final

One dispatched Server-Sent Event.

event is null when the wire event omitted the event field or supplied an empty event type. In that case the SSE default event type is message. id is null when this event block had no valid id field, and is an empty string when the block contained an empty id: field. retry is the valid non-negative retry field from this event block, in wire milliseconds.

The parser does not retain connection-level last-event-id or retry state. Callers own reconnection and may retain these values if their protocol needs them for a later request.

Constructors

AlphaXSseEvent({required String data, String? event, String? id, int? retry})
Creates an immutable parsed Server-Sent Event.
const

Properties

data String
Data after joining all data fields with newlines and removing the final field separator newline.
final
event String?
The event type, or null for the standard message default.
final
hashCode int
The hash code for this object.
no setteroverride
id String?
The event block's ID, preserving the distinction between absent and empty.
final
retry int?
The event block's valid retry hint in milliseconds, if present.
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.
override