ServerSentEvent class
A dataclass representing a Server Sent Event.
- Annotations
-
- @freezed
Constructors
- ServerSentEvent.new({@Default('message') String event, required String data, String? lastEventId})
-
Default constructor
constfactory
Properties
-
copyWith
→ $ServerSentEventCopyWith<
ServerSentEvent> -
no setterinherited
- data → String
-
The data that was sent by the server. Can be an empty string.
no setterinherited
- event → String
-
The event type of this SSE. Defaults to
message
, if not set.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- lastEventId → String?
-
An optional ID of the last event.
no setterinherited
- 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