BroadcastEvent class
An event received from the broadcast server.
Encapsulates the raw event name, the channel it arrived on, the decoded payload, and the local timestamp at which it was received. Instances are immutable and created by drivers when messages arrive.
Constructors
-
BroadcastEvent({required String event, required String channel, required Map<
String, dynamic> data, required DateTime receivedAt}) -
Creates a BroadcastEvent.
const
Properties
- channel → String
-
The channel name the event was received on (e.g.
'orders','private-inbox.1').final -
data
→ Map<
String, dynamic> -
The decoded JSON payload sent with the event.
final
- event → String
-
The event name as broadcast by the server (e.g.
'App\\Events\\OrderShipped').final - hashCode → int
-
The hash code for this object.
no setterinherited
- receivedAt → DateTime
-
The local DateTime at which this event was received by the driver.
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