File picker
An async directory browser with keyboard navigation and an optional allowed-extensions filter. Loads directory entries lazily and reports the chosen path via selected.
Install the package
Every component ships in the single dart_tui package.
$dart pub add dart_tui

FilePickerModel(
currentDir: Directory.current,
allowedExtensions: const ['.dart', '.yaml'],
showHidden: false,
height: 15,
);FilePickerModel
| Property | Type | Description |
|---|---|---|
| currentDir | Directory | Directory currently being browsed. |
| allowedExtensions | List<String> | Only show files with these extensions (empty = all). |
| showHidden | bool | Include dotfiles. |
| height | int | Visible rows before scrolling. Defaults to 15. |
| selected | String? | Chosen path once the user confirms. |
Keybindings
↑ / k, ↓ / jMove cursor
enterOpen directory or select file