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< inputStream, {int? maxVisibleItems, SelectComponentSizing sizing = const SelectComponentSizing.fit(), Set<int> >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< inputStream, {int? maxVisibleItems, SelectComponentSizing sizing = const SelectComponentSizing.fit()}) → Future<int> >int?> - Shows a scrollable terminal selection dialog and returns the selected index.