AiConversationList class
A ChatGPT-style conversation list / sidebar: a "New chat" action above a scrollable list of ChatThreads, with select and (optional) delete.
Presentational — drive it from a ChatThreadStore: pass threads, selectedId, and wire onSelect / onNew / onDelete to your store and controller.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AiConversationList
Constructors
-
AiConversationList({Key? key, required List<
ChatThread> threads, String? selectedId, void onSelect(ChatThread thread)?, VoidCallback? onNew, void onDelete(ChatThread thread)?, String? newChatLabel, Widget? header, Widget? trailingBuilder(BuildContext context, ChatThread thread)?}) -
Creates a conversation list.
const
Properties
-
Optional content pinned below the thread list — e.g. an account footer
(avatar · name · settings).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Optional content pinned above the new-chat action and thread list — e.g. a
brand wordmark, a close button, or fixed nav entries (Images/Library/…).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- newChatLabel → String?
-
Label for the new-chat action. Defaults to the localized "New chat".
final
- onDelete → void Function(ChatThread thread)?
-
Called when a thread's delete affordance is tapped. Hidden when null.
final
- onNew → VoidCallback?
-
Called when the "New chat" action is tapped. Hidden when null.
final
- onSelect → void Function(ChatThread thread)?
-
Called when a thread is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedId → String?
-
The id of the currently open thread, highlighted in the list.
final
-
threads
→ List<
ChatThread> -
The threads to show, in display order (typically newest first).
final
- trailingBuilder → Widget? Function(BuildContext context, ChatThread thread)?
-
Per-thread trailing widget (e.g. a pin glyph + overflow menu). When
provided it replaces the default delete affordance, so wire delete/pin
yourself. Return null for no trailing on a given thread.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited