WebSocketEvent class

Represents different types of WebSocket events.

Constructors

WebSocketEvent.new({required String type, dynamic data, DateTime? timestamp})
Creates a new WebSocketEvent.
WebSocketEvent.connected()
Event when connection is established.
WebSocketEvent.connectionFailed(String reason)
Event when connection fails.
WebSocketEvent.disconnected()
Event when connection is lost.
WebSocketEvent.error(String error)
Event when an error occurs.
WebSocketEvent.messageReceived(WebSocketMessage message)
Event when a message is received.
WebSocketEvent.messageSent(WebSocketMessage message)
Event when a message is sent.

Properties

data → dynamic
Event data.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
Timestamp when the event occurred.
final
type String
The event type.
final

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