ConversationNavigator class

A searchable list of conversations or sessions. Each row shows a title, status, and latest message (plus an unread count or pinned mark when they apply), and typing in the query field filters the rows.

By default a query keeps conversations that match it exactly, by prefix, as a substring, or as a fuzzy subsequence, listed in that order; pass matcher to decide matches yourself. Up and Down move the selected conversation from the query field or the list; in the list, PageUp, PageDown, Home, and End also jump. Enter or a click activates an enabled conversation and calls onSelect. Ctrl+C copies the selected conversation (in the query field, selected query text is copied instead).

Inheritance
Available extensions

Constructors

ConversationNavigator({Key? key, required List<ConversationEntry> conversations, TextEditingController? queryController, ConversationNavigatorController? controller, ConversationMatcher? matcher, String semanticLabel = 'Conversations', String placeholder = 'Search conversations...', int width = 60, int maxVisible = 6, bool showTimestamp = false, FocusNode? queryFocusNode, FocusNode? listFocusNode, bool autofocus = false, bool copySelection = true, ConversationNavigatorCopyOptions copyOptions = const ConversationNavigatorCopyOptions(), void onSelect(ConversationNavigatorSelectResult result)?, void onCopy(ConversationNavigatorCopyResult result)?})
const

Properties

autofocus → bool
Whether the query input should request focus when mounted.
final
controller → ConversationNavigatorController?
External controller for list selection and visible range.
final
conversations → List<ConversationEntry>
Source conversations to search, display, activate, and copy.
final
copyOptions → ConversationNavigatorCopyOptions
Clipboard/export options for selected-row copy.
final
copySelection → bool
Whether Ctrl+C (and the semantic copy action) copies the selected conversation.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
finalinherited
listFocusNode → FocusNode?
Focus node used by the conversation list.
final
matcher → ConversationMatcher?
Optional app-owned matcher used instead of default ranked search.
final
maxVisible → int
Maximum visible rows before the list scrolls.
final
onCopy → void Function(ConversationNavigatorCopyResult result)?
Called after a copy attempt completes.
final
onSelect → void Function(ConversationNavigatorSelectResult result)?
Called when the user activates an enabled conversation: Enter in the query field or the list, or a click on its row.
final
placeholder → String
Placeholder shown in the query input.
final
queryController → TextEditingController?
External controller for the query input.
final
queryFocusNode → FocusNode?
Focus node used by the query input.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel → String
Semantic label (the accessibility name; not rendered) for the navigator.
final
showTimestamp → bool
Prefix each row with the conversation's ConversationEntry.timestamp as a local HH:mm:ss clock, when one is set. Off by default.
final
width → int
Width, in terminal cells, reserved for query and rows.
final

Methods

animate({Duration? duration, Curve? curve, Object? trigger, bool repeat = false}) → Animate

Available on Widget, provided by the AnimateExtension extension

Starts an Animate chain over this widget. duration / curve apply to the whole chain. With no trigger it plays on mount; with a non-null trigger it rests on mount and replays whenever the token changes.
createElement() → StatefulElement
Creates the Element that will mount this widget into the tree.
inherited
createState() → State<ConversationNavigator>
Creates the mutable state for this widget at the current location in the tree. Called exactly once per StatefulElement instance.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited