Skip to content

FileMentionPicker

An @-mention picker: a query input over a ranked list of files, directories, symbols, and URLs, where picking an entry hands the composer its mention text (@lib/src/app.dart). Results rank exact, prefix, substring, then fuzzy matches; supply matcher to replace the ranking entirely.

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

const FileMentionPicker(
entries: <FileMentionEntry>[
FileMentionEntry(path: 'lib/main.dart', label: 'main.dart'),
FileMentionEntry(path: 'lib/src/app.dart', label: 'app.dart'),
FileMentionEntry(path: 'pubspec.yaml', label: 'pubspec.yaml'),
FileMentionEntry(path: 'README.md', label: 'README.md'),
],
)
ParameterTypeDefaultDescription
entries:List<FileMentionEntry>requiredSource mention entries to search, display, pick, and copy.
queryController:TextEditingController?—External controller for the query input.
controller:FileMentionPickerController?—External controller for result selection and visible range.
matcher:FileMentionMatcher?—Optional app-owned matcher used instead of default ranked search.
semanticLabel:String'File mentions'Semantic label (the accessibility name; not rendered) for the picker.
placeholder:String'Mention file...'Placeholder shown in the query input.
width:int60Width, in terminal cells, reserved for query and rows.
maxVisible:int6Maximum visible rows before the list scrolls.
queryFocusNode:FocusNode?—Focus node used by the query input.
resultsFocusNode:FocusNode?—Focus node used by the results list.
autofocus:boolfalseWhether the query input should request focus when mounted.
copySelection:booltrueWhether Ctrl+C and semantic copy export the selected mention.
copyOptions:FileMentionCopyOptionsconst FileMentionCopyOptions()Clipboard/export options for selected-mention copy.
onPick:void Function(FileMentionPickResult result)?—Called when a mention is picked.
onCopy:void Function(FileMentionCopyResult result)?—Called after a copy attempt completes.

FileMentionPicker is defined in packages/fleury/lib/src/catalog/file_mention_picker.dart.

Category: Navigation & overlays · All widgets