Flutter quickstart

Last updated  Aug 4, 2026

One plugin wraps the native iOS and Android SDKs. Add the git dependency, do the two-line platform setup, set credentials, and present.

Install the SDK

The plugin is consumed as a git dependency pinned to a release tag.

pubspec.yaml
dependencies:  voqal_flutter:    git:      url: https://github.com/VoqalAI/voqal-flutter.git      ref: "2.0.0"

Platform setup

Android needs the Voqal Maven repository (same as the native SDK) and a FlutterFragmentActivity host. iOS needs a 16.0 platform floor and a microphone usage description.

android/app/src/main/kotlin/MainActivity.kt
import io.flutter.embedding.android.FlutterFragmentActivity// Must extend FlutterFragmentActivity (a ComponentActivity), NOT FlutterActivity.class MainActivity : FlutterFragmentActivity()
ios/Podfile + Info.plist
# ios/Podfileplatform :ios, '16.0'<!-- ios/Runner/Info.plist --><key>NSMicrophoneUsageDescription</key><string>Voqal uses the microphone for voice conversations.</string>

Configure and set credentials

Call setuponce at app start, then hand the SDK your end user’s auth token with setCredentials — refresh it whenever it rotates.

main.dart
import 'package:voqal_flutter/voqal_flutter.dart';final voqal = Voqal();await voqal.setup(const VoqalConfig(  apiKey: 'pk_live_…',              // your Voqal API key (required, public)  requestId: 'prod-yourtenant',    // "prod-" / "stg-" selects the environment  theme: VoqalTheme(accent: '#2d5bff', appearance: VoqalAppearance.auto),));// Credentials are set separately and can be refreshed at any time.await voqal.setCredentials(  yourAuthToken,  metadataJson: '{"country_code":"EGY","user_id":"123"}',);await voqal.prewarm();   // optional: warm the connection so the first turn is instant
prewarm opens the engine connection in the background so the assistant answers instantly the first time it opens.

Present the assistant

Open the assistant from any widget.

home_screen.dart
ElevatedButton(  onPressed: () => voqal.present(),  child: const Text('Talk to Voqal'),)
  • Voice, transcription, widgets, and confirmations are handled inside the sheet — your app ships no assistant UI.
  • Theming, presentation style, header branding, and the action button share one model across platforms — see Configuration.
© 2026 VoqalVoqal SDK & engine documentation