flutter_gen_ai_chat_ui library
A Flutter package that provides a customizable chat UI for AI applications, featuring streaming responses, code highlighting, and markdown support.
Classes
- ActionConfirmationConfig
- Configuration for human-in-the-loop confirmations
- ActionController
- Controller for managing AiAction executions with context awareness
- ActionErrorHandler
- Centralized error handling for AI Actions
- ActionEvent
- Event data for action execution events
- ActionExecution
- State of a running action
- ActionParameter
- Definition of an action parameter
- ActionResult
- Result of an action execution
- ActionResultConfig
- Configuration for action result display
- ActionResultWidget
- Widget that displays the status and results of action executions
- AdvancedChatTheme
- Advanced chat theme system with 50+ sophisticated properties supporting gradients, typography scales, animations, and platform variations
- AgentAction
- Action that an agent can perform or suggest
- AgentCollaboration
- Collaboration between multiple agents
- AgentOrchestrator
- Multi-agent orchestration system similar to CopilotKit's CoAgents framework Manages agent coordination, routing, and collaborative problem-solving
- AgentRequest
- Request sent to an agent
- AgentResponse
- Response from an agent
- AgentState
- Current state of an agent
- AiAction
- An AiAction defines an AI-callable function with parameters, execution logic, and UI rendering
- AiActionBuilder
- Widget builder that provides access to AiActionHook
- AiActionConfig
- Configuration for the AiActionProvider
- AiActionHook
- Hook-like function to access AiActions in a widget Hook-like pattern for accessing AI actions in a widget
- AiActionProvider
- Inherited widget that provides AiAction functionality to the widget tree
- AIAgent
- Abstract base class for AI agents in the orchestration system Equivalent to CopilotKit's agent system with multi-agent coordination
- AiChatConfig
- Configuration class for customizing the AI chat interface.
- AiChatWidget
- A customizable chat widget for AI conversations.
- AiContextBuilder
- Widget builder that provides access to AiContextHook
- AiContextConfig
- Configuration for AI context management
- AiContextController
- Controller for managing AI context data and state observation
- AiContextData
- A piece of contextual information that the AI can access
- AiContextEvent
- Event emitted when context changes
- AiContextHook
- Hook-like access to AI context functionality
- AiContextProvider
- Provider widget that manages AI context throughout the widget tree
- AiContextProviderConfig
- Configuration for AiContextProvider
- AiFunctionCall
- Function call from AI
- AiFunctionCallResult
- Result from AI function calling
- AiFunctionCallStreamResult
- Streaming result from AI function calling
- AiService
- Abstract interface for AI services (OpenAI, Anthropic, etc.)
- AiServiceConfig
- Configuration for AI services
- AiServiceIntegration
- Helper for integrating AI services with ActionController
- AiSuggestion
- Represents an AI text suggestion for enhanced input fields Equivalent to CopilotKit's text enhancement suggestions
- AiSuggestionsBar
- A simple, non-invasive suggestions bar that displays suggestion chips above the input.
- AiTextInputConfig
- Configuration for AI-enhanced text input behavior
- AiTextInputController
- Controller for AI-enhanced text input similar to CopilotKit's useCopilotTextarea Provides autocompletion, smart edits, and draft generation capabilities
- AiTextInputState
- State for AI text input suggestions
- AndroidThemeVariant
- Android-specific theme variant following Material Design Guidelines
- BubbleStyle
- Class for customizing chat bubble appearance
- BubbleTheme
- BubbleTheme provides a simplified interface for chat bubble styling that bridges the gap between the old theme system and the current AdvancedChatTheme
- Callout
- ChatAnimationPresets
- Animation presets for chat UI elements with professional timing and curves
- ChatInput
- A custom chat input widget that supports extensive customization options.
- ChatMedia
- Represents a media attachment in a chat message.
- ChatMessage
- Represents a message in the chat.
- ChatMessagesController
- Controller for managing chat messages and their states.
- ChatSpacing
- Professional spacing system for consistent layout and visual hierarchy
- ChatSpacingConfig
- ChatThemeBuilder
- Powerful theme builder for creating custom chat themes
- ChatThread
- Model representing a chat thread with persistent state Equivalent to CopilotKit's thread management system
- ChatTypography
- Professional typography system for chat UI with 12+ carefully crafted text styles
- ChatUser
- Represents a user in the chat.
- CodeAnalysisAgent
- Code analysis specialist agent
- ContextAwareChatController
- A chat controller that automatically integrates readable context and actions Similar to CopilotKit's automatic context sharing during conversations
- ContextAwareChatProvider
- Widget provider for context-aware chat functionality Integrates all the essential CopilotKit-like features in one place
- CopilotTextarea
- A drop-in replacement for TextField that provides AI-powered assistance Equivalent to CopilotKit's CopilotTextarea component
- CustomChatWidget
- CustomThemeExtension
- DataTableLite
- DesktopThemeVariant
- Desktop-specific theme variant for Windows, macOS, Linux
- ExampleQuestion
- ExampleQuestionConfig
- Configuration for individual example questions in the chat
- FileUploadOptions
- Options for customizing the file upload functionality
- GeneralAssistantAgent
- General assistant agent that can delegate to specialists
- GlassmorphicContainer
- A container with a glassmorphic effect (blurred transparent background).
- GlassmorphicDecoration
- A utility class to create glassmorphic decoration effects.
- HeadlessChatController
- Headless chat controller providing full programmatic control Equivalent to CopilotKit's useCopilotChat hook
- InlineAutocompleteTextField
- An input field that can display a faint inline "ghost" suggestion after the user's current text, and accept it with Tab (optional).
- InputOptions
- Input options for customizing the chat input field. Designed to be more aligned with Dila's approach.
- IOSThemeVariant
- iOS-specific theme variant following Human Interface Guidelines
- KeyValueList
- LoadingConfig
- Configuration class for loading states in the chat UI.
- LoadingWidget
- A highly customizable loading widget that displays a shimmer effect with animated text.
- MessageAttachment
- Displays a media attachment in a chat message
- MessageListOptions
- Options for customizing the message list
- MessageOptions
- Options for customizing message appearance and behavior
- MessageReaction
- Represents a reaction to a chat message.
- MockAiService
- Mock AI service for testing and development
- PaginationConfig
- Configuration for pagination in the chat UI.
- PlatformThemeVariants
- Platform-specific theme variations to ensure native look and feel
- QuickReply
- A model representing a quick reply option in the chat.
- QuickReplyOptions
- Options for customizing quick replies
- ReadableContext
- Represents a single readable context item
- ReadableContextController
- A controller that manages readable context data for AI consumption Equivalent to CopilotKit's useCopilotReadable hook
- ReadableContextProvider
- Widget that provides readable context to descendant widgets Equivalent to wrapping components with useCopilotReadable in React
- ResultCard
- ResultRendererRegistry
-
UI-only registry mapping a string
kindto a result widget builder. - RoutingDecision
- Routing decision for agent orchestration
- ScrollBehaviorConfig
- Configuration for scroll behavior in the chat.
- ScrollToBottomOptions
- Options for customizing scroll to bottom button
- TextAnalysisAgent
- Text analysis specialist agent
- ThreadState
- Thread state for managing multiple chat threads Similar to CopilotKit's isolated chat states
- TranscriptChip
- VoiceSendButton
- VoiceStatusBar
- WebThemeVariant
- Web-specific theme variant for browser environments
- WelcomeMessageConfig
- Configuration for the welcome message section of the chat
Enums
- ActionEventType
- Event types for action execution
- ActionParameterType
- Types of parameters that can be passed to actions
- ActionPriority
- ActionStatus
- Status of an action execution
- AgentPriority
- AgentRequestType
- AgentResponseType
- AgentStatus
- Enums for agent system
- AiContextEventType
- Event types for context updates
- AiContextPriority
- Priority levels for context data
- AiContextType
- Types of context data that can be provided to AI
- AiFunctionCallResultType
- AiSuggestionType
- Types of AI suggestions available
- AutoScrollBehavior
- Defines when the chat should automatically scroll to the bottom
- CalloutType
- ChatMediaType
- Enum representing different types of media in chat messages.
- CollaborationStatus
- DuplexState
- GradientType
- Type of gradient to apply to the loading indicator background.
- InputContainerWidth
- Controls how the input container's width should be sized
- VoiceSendMode
- VoiceState
Mixins
-
AiContextAware<
T extends StatefulWidget> - Mixin for widgets that need to provide context to AI
-
ContextAwareChatMixin<
T extends StatefulWidget> - Mixin to easily add context-aware chat functionality to any widget
-
ReadableContextMixin<
T extends StatefulWidget> - Mixin to easily add readable context functionality to any widget
Extensions
- ColorExtensions on Color
- Extensions on Color class to provide utility methods for color manipulation
- ContextAwareChatExtension on BuildContext
- Extension to easily access context-aware chat functionality
Typedefs
-
ResultBuilder
= Widget Function(BuildContext context, Map<
String, dynamic> data)
Exceptions / Errors
- ActionException
- Custom exception for action-specific errors
- AgentException
- Exception thrown by the agent system
- AiServiceException
- Exception for AI service errors
- NetworkException
- Exception for network-related errors
- TimeoutException
- Exception for timeout errors
- ValidationException
- Exception for parameter validation errors