RealtimeEvent class sealed

Base class for all realtime events.

Events are sent and received over the WebSocket connection.

Wire names: a few server events have multiple historical names (e.g., response.text.delta and response.output_text.delta, response.audio.delta and response.output_audio.delta, response.audio_transcript.delta and response.output_audio_transcript.delta). fromJson accepts either spelling and dispatches to the same Dart class. Unrecognised event types fall through to UnknownRealtimeEvent rather than throwing, so future server additions don't break existing clients.

Implementers

Constructors

RealtimeEvent.fromJson(Map<String, dynamic> json)
Creates a RealtimeEvent from JSON.
factory

Properties

eventId String?
The event ID.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The event type.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
inherited

Operators

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