SelectPanel
Category: UI
Source: select_panel.dart
Classes
SelectOption
Constructor
dart
SelectOption({required this.value, required String label, String? searchText})dart
SelectOption.responsive({
required this.value,
required String Function(int contentWidth) build,
required this.searchText,
})Properties
| Property | Type | Description |
|---|---|---|
value | T | |
searchText | String | |
label | String get | Back-compat getter — callers that need a one-shot snapshot at a default width. Prefer renderLabel(width) directly. |
label | String get | Back-compat getter — callers that need a one-shot snapshot at a default width. Prefer renderLabel(width) directly. |
SelectPanel
Constructor
dart
SelectPanel({
required this.title,
required this.options,
this.headerLines = const [],
this.headerBuilder,
this.emptyText = 'No results.',
this.searchEnabled = true,
this.searchHint = 'Type to filter',
this.box = Box.light,
this.borderColor = '\x1b[2m',
this.barrier = BarrierStyle.dim,
PanelSize? width,
PanelSize? height,
this.dismissable = true,
int initialIndex = 0,
})Properties
| Property | Type | Description |
|---|---|---|
title | String | |
options | List<SelectOption<T>> | |
headerLines | List<String> | |
emptyText | String | |
searchEnabled | bool | |
searchHint | String | |
box | Box | |
borderColor | String | |
barrier | BarrierStyle | |
dismissable | bool | |
isComplete | bool get | |
result | Future<void> get | |
selection | Future<T?> get | |
isComplete | bool get | |
result | Future<void> get | |
selection | Future<T?> get |
Methods
void cancel()
void dismiss()
bool handleEvent(TerminalEvent event)
`List<String> render(
int termWidth,
int termHeight,
List<String> backgroundLines,
)`