inteliz_chatbot
A drop-in Flutter chatbot widget for Inteliz Labs agents. Add a floating launcher that expands into a full chat experience — message streaming, forms, pipelines, multi-language, theming — with a single widget and your API key.
Features
- One-widget integration —
ChatbotWidget(apiKey: ...)and you're done. - Floating launcher → full chat panel. Minimized bubble in the corner; expands to a floating popover on wide screens and full-screen on phones.
- Streaming responses, lead-capture forms, guided pipelines, quick questions.
- Theming driven by your agent's configuration (colors, logo, copy, position).
- Light/dark aware.
Getting started
Add the package:
dependencies:
inteliz_chatbot: ^0.1.0
You need an agent API key from your Inteliz dashboard. The backend URL is baked into the SDK — you only supply the key.
Usage
import 'package:flutter/material.dart';
import 'package:inteliz_chatbot/inteliz_chatbot.dart';
class HomeScreen extends StatelessWidget {
const HomeScreen({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
// The chat goes full-screen when open on a phone, so a chat-first screen
// typically omits the AppBar. Place the widget in a Stack above your page.
body: Stack(
children: [
const Center(child: Text('My App')),
ChatbotWidget(apiKey: apiKey),
],
),
);
}
}
That's the whole integration.
Configuring your API key
Your API key is a publishable key — like Stripe's
pk_…or a Google Maps key. It is scoped to chat endpoints for a single agent and rate-limited on the backend, so it is safe to ship inside a client app. You cannot keep any key truly secret in a compiled mobile app (it can be extracted from the APK/IPA); that's why this key is designed to be public-safe and the privileged operations live on the server, never in the SDK.
The recommended way to supply the key is --dart-define-from-file — this
keeps the key out of your source code and version control, and lets CI inject a
different key per environment.
-
Create
env.json(and add it to.gitignore):{ "INTELIZ_API_KEY": "your-real-key" } -
Commit an
env.example.jsontemplate so collaborators know the shape:{ "INTELIZ_API_KEY": "YOUR_API_KEY_HERE" } -
Read it via the compile-time environment:
const apiKey = String.fromEnvironment('INTELIZ_API_KEY'); -
Run / build with the file:
flutter run --dart-define-from-file=env.json flutter build apk --dart-define-from-file=env.json
This is about hygiene (no secrets in git, clean per-environment builds) — not on-device secrecy, which isn't achievable and isn't needed for a publishable key.
Additional information
See the example/ app for a runnable integration.
Libraries
- inteliz_chatbot
- Inteliz Chatbot — drop-in Flutter chatbot widget.