cli_components library

Library for simple, self-contained interactive CLI components.

Classes

SelectComponentSizing
Controls the vertical sizing of a selection dialog.
SelectOption
An option in a selection dialog, with a primary label and an optional description shown when the option is hovered.

Functions

showMultiSelectDialog(List<Object> options, Stream<List<int>> inputStream, {int? maxVisibleItems, SelectComponentSizing sizing = const SelectComponentSizing.fit(), Set<int> initialSelected = const {}}) → Future<Set<int>?>
Shows a scrollable terminal selection dialog and returns the set of selected indices.
showSingleSelectDialog(List<Object> options, Stream<List<int>> inputStream, {int? maxVisibleItems, SelectComponentSizing sizing = const SelectComponentSizing.fit()}) → Future<int?>
Shows a scrollable terminal selection dialog and returns the selected index.