flutter_ai_chat_kit 0.0.1 copy "flutter_ai_chat_kit: ^0.0.1" to clipboard
flutter_ai_chat_kit: ^0.0.1 copied to clipboard

A production-ready Flutter package for integrating multiple AI providers (OpenAI, Gemini, Claude, etc.) with a unified API.

flutter_ai_chat #

A production-ready Flutter package for integrating multiple AI providers (OpenAI, Gemini, Claude, etc.) with a unified API.

Features #

  • Unified API: Switch between AI providers (OpenAI, Gemini, etc.) without changing your UI code.
  • Streaming Support: Real-time responses with incremental updates.
  • Clean Architecture: Decoupled business logic, repository pattern, and strategy pattern for providers.
  • Markdown Support: Built-in markdown rendering for AI responses.
  • Conversation Persistence: Easily save and load conversation history.
  • State Management Agnostic: Works with Bloc, Riverpod, Provider, or simple ValueNotifiers.

Quick Start #

1. Initialize the Provider #

final provider = OpenAIProvider(
  apiKey: 'your-api-key',
  model: 'gpt-4',
);

2. Setup the Repository #

final repository = ChatRepository(provider: provider);

3. Use the Controller #

final controller = AIChatController(repository: repository);

// Send a message
await controller.sendMessage("Hello!");

// Or stream a message
await controller.streamMessage("Write a story...");

4. Plug into UI #

AIChatView(
  controller: controller,
)

Supported Providers #

  • ✅ OpenAI
  • ❌ Gemini (Coming Soon)
  • ❌ Claude (Coming Soon)
  • ❌ Ollama (Coming Soon)
  • ❌ DeepSeek (Coming Soon)

License #

MIT

1
likes
0
points
259
downloads

Publisher

unverified uploader

Weekly Downloads

A production-ready Flutter package for integrating multiple AI providers (OpenAI, Gemini, Claude, etc.) with a unified API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, dio, flutter, flutter_markdown, freezed_annotation, hive, hive_flutter, http, json_annotation, logging, markdown_widget, path_provider, uuid

More

Packages that depend on flutter_ai_chat_kit