UnknownClientMessage class
Unknown client message type.
This is returned when deserializing a message type that this client version doesn't recognize. This allows graceful handling of future API additions without crashing.
Applications can check for this type and handle it appropriately:
final message = BidiGenerateContentClientMessage.fromJson(json);
if (message is UnknownClientMessage) {
// Log or ignore unrecognized message type
print('Unknown message: ${message.rawJson.keys}');
}
- Inheritance
-
- Object
- BidiGenerateContentClientMessage
- UnknownClientMessage
Constructors
-
UnknownClientMessage(Map<
String, dynamic> rawJson) -
Creates an UnknownClientMessage.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts to JSON with the message type wrapper key.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited