UnknownEvent class

An event with an unrecognized type.

This is returned for any event type that the library does not yet handle (e.g. keepalive events emitted during long-running streaming operations). It preserves the raw JSON so callers can inspect it if needed.

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

UnknownEvent({required String type, required Map<String, dynamic> rawJson, int? sequenceNumber})
Creates an UnknownEvent.
const
UnknownEvent.fromJson(Map<String, dynamic> json)
Creates an UnknownEvent from JSON.
factory

Properties

finalResponse Response?

Available on ResponseStreamEvent, provided by the ResponseStreamEventExtensions extension

Returns the final response if this is a completion event.
no setter
hashCode int
The hash code for this object.
no setteroverride
isFinal bool
Whether this event signals the end of the stream.
no setterinherited
rawJson Map<String, dynamic>
The raw JSON of the unrecognized event.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sequenceNumber int?
The sequence number for ordering events.
final
textDelta String?

Available on ResponseStreamEvent, provided by the ResponseStreamEventExtensions extension

Returns the text delta if this is a text delta event.
no setter
type String
The type of the event.
final

Methods

copyWith({String? type, Map<String, dynamic>? rawJson, Object? sequenceNumber = unsetCopyWithValue}) UnknownEvent
Creates a copy with replaced values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
override
toString() String
A string representation of this object.
override

Operators

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