WebSocketInterceptor class
WebSocket interceptor to capture WebSocket connections and events
Constructors
Properties
- hashCode → int
-
The hash code for this object.
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
Static Properties
- isEnabled → bool
-
Check if interception is enabled
no setter
-
updateTrigger
→ SwiftValue<
Map< String, WebSocketConnection> > -
Get update trigger for reactive UI updates (accesses the reactive connections)
no setter
Static Methods
-
captureConnection(
{required String url, Map< String, String> ? headers}) → String - Capture WebSocket connection
-
captureEvent(
{required String connectionId, required WebSocketEventType type, dynamic data, String? error}) → void - Capture WebSocket event
-
clear(
) → void - Clear all connections and events
-
disable(
) → void - Disable WebSocket interception
-
enable(
{int maxConnections = 50, int maxEventsPerConnection = 100}) → void - Enable WebSocket interception Preserves existing connections and events across hot reloads
-
getAllEvents(
) → List< WebSocketEvent> - Get all events
-
getConnection(
String id) → WebSocketConnection? - Get a specific connection by ID
-
getConnectionEvents(
String connectionId) → List< WebSocketEvent> - Get events for a specific connection
-
getConnections(
) → List< WebSocketConnection> - Get all connections