sendText method
Sends a text turn (e.g. when the user types instead of speaking).
Implementation
Future<void> sendText(String text) async {
final ch = _channel;
if (ch == null) {
throw StateError('GeminiRealtimeClient.sendText: not connected');
}
_send({
'client_content': {
'turns': [
{
'role': 'user',
'parts': [
{'text': text},
],
},
],
'turn_complete': true,
},
});
}