inteliz_chatbot 0.1.0 copy "inteliz_chatbot: ^0.1.0" to clipboard
inteliz_chatbot: ^0.1.0 copied to clipboard

Drop-in Flutter chatbot widget for Inteliz Labs agents: a floating launcher that expands into a full chat panel with streaming replies, lead-capture forms, guided pipelines, multi-language support and [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:inteliz_chatbot/inteliz_chatbot.dart';

// Your agent's API key, injected at build time and read from the compile-time
// environment — keeps it out of source/git. Provide it with:
//   flutter run --dart-define-from-file=env.json
// (env.json is gitignored; see env.example.json for the shape.)
//
// The backend URL is baked into the SDK — your API key is all you need.
const _apiKey = String.fromEnvironment('INTELIZ_API_KEY');

void main() => runApp(const ExampleApp());

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Inteliz Chatbot Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
        useMaterial3: true,
      ),
      home: const HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // No AppBar: the chatbot needs the whole screen when open. The widget's
      // own SafeArea keeps its header clear of the status bar.
      // Stack lets the chatbot float above the page content. The bubble sits in
      // the corner when minimized; tapping it expands to full screen on a phone.
      body: Stack(
        children: [
          const Center(
            child: Padding(
              padding: EdgeInsets.all(24),
              child: Text(
                'Tap the chat bubble in the corner to start chatting.',
                textAlign: TextAlign.center,
                style: TextStyle(fontSize: 18),
              ),
            ),
          ),
          // The whole integration: one widget, one key.
          const ChatbotWidget(apiKey: _apiKey),
        ],
      ),
    );
  }
}
0
likes
140
points
9
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Drop-in Flutter chatbot widget for Inteliz Labs agents: a floating launcher that expands into a full chat panel with streaming replies, lead-capture forms, guided pipelines, multi-language support and agent-driven theming.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_markdown_plus, flutter_svg, google_fonts, http, provider, shared_preferences, uuid

More

Packages that depend on inteliz_chatbot