adk_flutter 1.0.0 copy "adk_flutter: ^1.0.0" to clipboard
adk_flutter: ^1.0.0 copied to clipboard

ADKflutter - Official Flutter package by 20Centra for connecting to Gemini Live API server with WebSocket support for multimodal AI interactions.

ADKflutter #

ADKflutter is the official Flutter package by 20Centra for connecting to the Gemini Live API server. It provides a robust WebSocket client for real-time, multimodal AI interactions, including audio streaming, text messaging, and image context.

Features #

  • Real-time Audio Streaming: Stream PCM audio data to the Gemini Live API.
  • Multimodal Interaction: Send text and images (context) alongside audio.
  • WebSocket Support: Persistent connection management with automatic reconnection logic.
  • Event-Driven: Listen to streams for audio, text, transcription, and connection state.
  • Background Processing: Image compression and processing handled in background isolates.

Getting Started #

Add adk_flutter to your pubspec.yaml:

dependencies:
  adk_flutter: ^1.0.0

Usage #

Initialization #

import 'package:adk_flutter/adk_flutter.dart';

final client = AdkFlutterClient(
  serverUrl: 'wss://your-api-endpoint.com',
  apiKey: 'YOUR_API_KEY',
);

// Connect to the server
await client.connect();

Sending Audio #

// Send raw PCM audio bytes (16kHz, 16-bit, mono)
client.sendAudio(pcmData);

Sending Text #

client.sendText('Hello, Gemini!');

Listening to Responses #

client.onText.listen((text) {
  print('Received text: $text');
});

client.onAudio.listen((audioData) {
  // Play audio data
});

License #

This project is licensed under the MIT License - see the LICENSE file for details.


Copyright (c) 2025 20Centra. All rights reserved.

1
likes
160
points
209
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

ADKflutter - Official Flutter package by 20Centra for connecting to Gemini Live API server with WebSocket support for multimodal AI interactions.

Homepage

License

MIT (license)

Dependencies

flutter, http, image, rxdart, uuid, web_socket_channel

More

Packages that depend on adk_flutter