selectableItemWithPrefix method

void selectableItemWithPrefix(
  1. String content, {
  2. required bool focused,
  3. required String prefix,
})

Writes a custom selectable item with a prefix before the content.

Useful for items that need extra decoration beyond the arrow indicator. The prefix appears after the arrow, before the content.

Example: ▶ [x] Option 1 where [x] is the prefix.

Implementation

void selectableItemWithPrefix(
  String content, {
  required bool focused,
  required String prefix,
}) {
  final arrow = lb.arrow(focused);
  final line = '$arrow $prefix $content';
  highlightedLine(line, highlighted: focused);
}