flutter_chat_kit_ui library
Flutter ChatKit - A drop-in chat UI widget compatible with OpenAI ChatKit backends.
Classes
- ActiveStatus
- Thread is open and accepting new messages.
- Annotation
- AnnotationAdded
- ApiConfig
- Base class for API configuration
- AssistantMessageContent
- Content part of an assistant message
- AssistantMessageContentPartAdded
- AssistantMessageItem
- Assistant message thread item
- Attachment
- AttachmentController
- Manages attachment uploads
- AttachmentCreateRequest
- Create an attachment upload descriptor
- AttachmentDeleteRequest
- Delete an attachment
- AttachmentUploadDescriptor
- AttachmentUploadState
- Upload state for a single attachment
- BadgeNode
- BasicRoot
- ButtonNode
- CardRoot
- ChatKit
- The root ChatKit widget that provides the complete chat UI.
- ChatKitCheckbox
- A simple checkbox, replacing Material Checkbox.
- ChatKitClient
- Abstract interface for ChatKit API communication
- ChatKitColorScheme
- Color scheme for ChatKit, supporting light and dark modes
- ChatKitController
- The main controller for ChatKit. Exposes the full API surface and coordinates sub-controllers.
- ChatKitDensity
- Spacing and padding presets for ChatKit
- ChatKitDivider
- A thin horizontal line, replacing Material Divider.
-
ChatKitDropdown<
T> - A dropdown selector using an overlay, replacing Material DropdownButtonFormField.
-
ChatKitDropdownItem<
T> - ChatKitEventCallbacks
- Collection of optional event callbacks
- ChatKitIconButton
- A simple icon button that does not depend on Material.
- ChatKitIcons
- Centralized icon constants for ChatKit.
- ChatKitInherited
- Provides the ChatKitController to descendant widgets
- ChatKitLocalizations
- Abstract localization class for ChatKit strings
- ChatKitLocalizationsDelegate
- Localizations delegate for ChatKit
- ChatKitLocalizationsEn
- English localization (default)
- ChatKitOptions
- Top-level configuration for the ChatKit widget
-
ChatKitPopupMenu<
T> - A popup menu triggered by an icon tap, replacing Material PopupMenuButton.
-
ChatKitPopupMenuItem<
T> - ChatKitRadius
- Corner radius presets for ChatKit
- ChatKitSpinner
- An indeterminate / determinate spinner, replacing Material CircularProgressIndicator.
- ChatKitTappable
- A tappable area with optional highlight, replacing Material InkWell / Material+InkWell.
- ChatKitTextField
- A text field built on EditableText, replacing Material TextField.
- ChatKitTheme
- Provides ChatKit theme data to descendant widgets
- ChatKitThemeData
- Complete theme data for ChatKit
- ChatKitTypography
- Typography configuration for ChatKit
- CheckboxNode
- ClientEffectEvent
- ClientToolCallItem
- Client tool call thread item
- ClosedStatus
- Thread is closed, optionally with a reason.
- ColNode
- ComposerOption
- Configuration for the composer
- ContentPartDone
- CustomApiConfig
- Configuration for self-hosted ChatKit backend
- CustomClient
- Client for self-hosted ChatKit backend
- CustomSummary
- CustomTask
- DisclaimerOption
- Configuration for the disclaimer text
- DividerNode
- DurationSummary
- EndOfTurnItem
- EntitiesOption
- Configuration for @-mention entities
- Entity
- EntitySource
- ErrorEvent
- FileAttachment
- FileSource
- FileTask
- FileUploadOption
- Configuration for file upload in the composer
- FormNode
- GeneratedImage
- GeneratedImageItem
- GeneratedImageUpdated
- HeaderOption
- Configuration for the chat header bar
- HistoryOption
- Configuration for the history panel
- HostedApiConfig
- Configuration for OpenAI-hosted ChatKit backend
- HostedClient
- Client for the OpenAI-hosted ChatKit backend. Wraps CustomClient with token management.
- IconNode
- ImageAttachment
- ImageNode
- ImageTask
- InferenceOptions
- InputNode
- ItemsFeedbackRequest
- Submit feedback on thread items
- ItemsListRequest
- List items in a thread (non-streaming)
- LabelNode
- LinkNode
- ListViewRoot
- LockedStatus
- Thread is locked, optionally with a reason.
- MessageController
- Manages message composition and sending state
- ModelItem
- A model choice displayed in the model picker
- ModelOption
- Configuration for model selection
- NoticeEvent
-
Page<
T> - Generic cursor-based pagination wrapper.
- ProgressUpdateEvent
- RequestMetadata
- Base request metadata
- RowNode
- SearchTask
- SelectNode
- SelectOption
- Source
- SpacerNode
- SseClient
- Creates an SSE connection to a URL
- SseConnection
- Represents an active SSE connection that can be cancelled
- SseParser
-
Parses a byte stream into SSE events.
SSE format: lines prefixed with "data: ", separated by empty lines.
Stream terminates on
DONEor data:DONE. - StartScreenOption
- Configuration for the start screen
- StreamOptionsEvent
- StreamResult
- Result of a streaming request
- SuggestedPrompt
- A suggested prompt displayed on the start screen
- TableColumn
- TableNode
- Task
- TextAreaNode
- TextDelta
- TextNode
- ThoughtTask
- Thread
- A thread with its items (messages, tool calls, etc.).
- ThreadAddMessageRequest
- Add a user message to an existing thread
- ThreadAddToolOutputRequest
- Submit client tool call output
- ThreadController
- Manages the thread list and active thread selection
- ThreadCreatedEvent
- ThreadCreateRequest
- Create a new thread with an initial message
- ThreadCustomActionRequest
- Execute a custom widget action
- ThreadDeleteRequest
- Delete a thread
- ThreadGetByIdRequest
- Get thread by ID (non-streaming)
- ThreadItem
- Sealed class for all thread item types
- ThreadItemActionsOption
- Configuration for actions on thread items (feedback, copy, retry)
- ThreadItemAddedEvent
- ThreadItemBase
- Base fields shared by all thread items
- ThreadItemDoneEvent
- ThreadItemRemovedEvent
- ThreadItemReplacedEvent
- ThreadItemUpdate
- Granular updates to thread items during streaming
- ThreadItemUpdatedEvent
- ThreadListRequest
- List threads (non-streaming)
- ThreadMetadata
- Thread metadata used in thread lists.
- ThreadRetryRequest
- Retry from a specific item
- ThreadStatus
- Thread status sealed class hierarchy.
- ThreadStreamEvent
- All possible server-sent events during a thread stream
- ThreadUpdatedEvent
- ThreadUpdateRequest
- Update thread title
- TokenManager
- Manages client secret tokens for the hosted API. Handles token refresh when expired.
- ToolChoice
- ToolItem
- A tool item displayed in the tool picker
- ToolOption
- Configuration for tool selection
- UrlSource
- UserMessageContent
- User message content sealed class
- UserMessageInput
- User message input (for sending)
- UserMessageItem
- User message thread item
- UserMessageTagContent
- UserMessageTextContent
- WidgetAction
- Represents an action dispatched from an interactive widget
- WidgetActionController
- Manages widget action dispatching
- WidgetDelta
- WidgetItem
- WidgetNode
- Sealed class representing all possible widget node types
- WidgetRenderer
- Renders a WidgetRoot into a Flutter Widget
- WidgetRoot
- Root container for interactive widgets
- WidgetsOption
- Configuration for the widget system
- Workflow
- WorkflowExpandedUpdated
- WorkflowItem
- WorkflowSummary
- WorkflowSummaryUpdated
- WorkflowTaskAdded
- WorkflowTaskDone
- WorkflowTaskUpdated
Enums
- ToolCallStatus
- Status of a client tool call
Typedefs
- CancelStream = void Function()
- Callback for cancelling an active stream
- OnError = void Function(String? code, String message, bool allowRetry)
- Callback for errors
- OnProgress = void Function(String? icon, String? text)
- Callback for progress updates
- OnStreamEvent = void Function(ThreadStreamEvent event)
- Callback for when any stream event is received
- OnThreadCreated = void Function(Thread thread)
- Callback for when a thread is created
- OnThreadItemAdded = void Function(ThreadItem item)
- Callback for when a thread item is added
- OnThreadItemDone = void Function(ThreadItem item)
- Callback for when a thread item is done (finalized)
- OnThreadUpdated = void Function(Thread thread)
- Callback for when a thread is updated
- OnWidgetAction = void Function(WidgetAction action)
- Callback for dispatching widget actions
- VoidCallback = void Function()
- Callback type for void functions
-
WidgetActionCallback
= Future<
void> Function(String threadId, String itemId, Map<String, dynamic> action) - Callback type for widget action dispatch