Prompts
Self-contained, one-shot flows built on Program — no model to write. Each returns a Future and accepts a programOptions list so it can be scripted or tested headlessly. All return null when cancelled with Esc/Ctrl+C.
Install the package
Every component ships in the single dart_tui package.
$dart pub add dart_tui

final choice = await promptSelect(['apple', 'banana'], title: 'Pick one');
final ok = await promptConfirm('Continue?');
final name = await promptInput('Name');
if (name == null) return; // user cancelled
print('Hello, $name!');Helpers
| Property | Type | Description |
|---|---|---|
| promptSelect(items, {title}) | Future<String?> | Single-choice picker. |
| promptConfirm(message) | Future<bool?> | Yes/no confirmation. |
| promptInput(label) | Future<String?> | Single-line text prompt. |