Components/File picker

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
file picker · dart_tui
File picker demo

FilePickerModel

PropertyTypeDescription
currentDirDirectoryDirectory currently being browsed.
allowedExtensionsList<String>Only show files with these extensions (empty = all).
showHiddenboolInclude dotfiles.
heightintVisible rows before scrolling. Defaults to 15.
selectedString?Chosen path once the user confirms.

Keybindings

↑ / k, ↓ / jMove cursor
enterOpen directory or select file

Related