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'), ],)Constructors
Section titled “Constructors”FileMentionPicker()
Section titled “FileMentionPicker()”| Parameter | Type | Default | Description |
|---|---|---|---|
entries: | List<FileMentionEntry> | required | Source 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: | int | 60 | Width, in terminal cells, reserved for query and rows. |
maxVisible: | int | 6 | Maximum 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: | bool | false | Whether the query input should request focus when mounted. |
copySelection: | bool | true | Whether Ctrl+C and semantic copy export the selected mention. |
copyOptions: | FileMentionCopyOptions | const 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. |
Source
Section titled “Source”FileMentionPicker is defined in packages/fleury/lib/src/catalog/file_mention_picker.dart.
Category: Navigation & overlays · All widgets