flutter_ai_toolkit_extended library

A fork of flutter_ai_toolkit with an additional maxWidth constraint on user message bubbles, capping them at a configurable fraction of the screen width. AI responses continue to span full screen width.

This is the primary library entry point for flutter_ai_toolkit_extended. You may import this or the compatibility alias: import 'package:flutter_ai_toolkit_extended/flutter_ai_toolkit_extended.dart'; import 'package:flutter_ai_toolkit_extended/flutter_ai_toolkit.dart';

Classes

ActionButtonStyle
Style for icon buttons.
Attachment
An abstract class representing an attachment in a chat message.
ChatInputStyle
Style for the input text box.
ChatMessage
Represents a message in a chat conversation.
EchoProvider
A simple LLM provider that echoes the input prompt and attachment information.
FileAttachment
Represents a file attachment in a chat message.
FileAttachmentStyle
Style for file attachments in the chat view.
FirebaseProvider
A provider class for interacting with Firebase Vertex AI's language model.
ImageFileAttachment
Represents an image attachment in a chat message.
LinkAttachment
Represents a link attachment in a chat message.
LlmChatView
A widget that displays a chat interface for interacting with an LLM (Language Model).
LlmChatViewStyle
Style for the entire chat widget.
LlmMessageStyle
Style for LLM messages.
LlmProvider
An abstract class representing a Language Model (LLM) provider.
SuggestionStyle
A class that defines the style for suggestions.
UserMessageStyle
Style for user messages.
VoiceNoteRecorderStyle
Style for the waveform recorder widget.

Enums

ActionButtonType
Enum representing different types of action buttons in the chat view.
MessageOrigin
Represents the origin of a chat message.

Typedefs

LlmStreamGenerator = Stream<String> Function(String prompt, {required Iterable<Attachment> attachments})
A function that generates a stream of text based on a prompt and attachments.
SpeechToTextConverter = Stream<String> Function(XFile file)
A function that converts speech to text.

Exceptions / Errors

LlmCancelException
Exception thrown when an LLM operation is cancelled.
LlmException
Exception class for LLM-related errors.
LlmFailureException
Exception thrown when an LLM operation fails.