SseEvent class

Payload for a single Server-Sent Event.

await writer.writeSSE(SseEvent(
  event: 'update',
  data: jsonEncode({'count': 42}),
  id: '1',
));

Constructors

SseEvent({required String data, String? event, String? id, int? retry})
const

Properties

data → String
final
event → String?
final
hashCode → int
The hash code for this object.
no setterinherited
id → String?
final
retry → int?
Reconnection delay in milliseconds sent to the client.
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.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited