chatbotify 0.1.1 copy "chatbotify: ^0.1.1" to clipboard
chatbotify: ^0.1.1 copied to clipboard

A plug-and-play AI chatbot package for Flutter with support for Gemini and OpenAI, streaming responses, Markdown rendering, theming, and pluggable storage. Minimal setup, production-ready UI.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:chatbotify/chatbotify.dart';

void main() {
  AiChatbot.initialize(
    provider: AIProvider.gemini,
    apiKey: const String.fromEnvironment('AI_API_KEY', defaultValue: 'YOUR_API_KEY'),
    systemPrompt: 'You are a friendly, concise assistant for a demo app.',
  );

  runApp(const ProviderScope(child: MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  /// Matches Romind: default to dark.
  ThemeMode _themeMode = ThemeMode.dark;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'chatbotify example',
      debugShowCheckedModeBanner: false,
      theme: ChatbotAppTheme.light,
      darkTheme: ChatbotAppTheme.dark,
      themeMode: _themeMode,
      home: AiChatScreen(
        title: 'Chatbotify',
        showThemeToggle: true,
        isDarkMode: _themeMode == ThemeMode.dark,
        onToggleTheme: () {
          setState(() {
            _themeMode = _themeMode == ThemeMode.dark
                ? ThemeMode.light
                : ThemeMode.dark;
          });
        },
      ),
    );
  }
}
0
likes
135
points
32
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A plug-and-play AI chatbot package for Flutter with support for Gemini and OpenAI, streaming responses, Markdown rendering, theming, and pluggable storage. Minimal setup, production-ready UI.

Repository (GitHub)
View/report issues

Topics

#chatbot #ai #gemini #openai #chat

License

MIT (license)

Dependencies

flutter, flutter_markdown, flutter_riverpod, google_fonts, http, uuid

More

Packages that depend on chatbotify