ChoiceMenuExtension<T> extension

Extends Choice with grouping/selection helpers used by the menu list.

Keeps the per-item logic (group title detection, selection lookup, etc.) out of widget build methods so the rendering code stays declarative.

on

Properties

isGroupingTitle bool

Available on Choice<T>, provided by the ChoiceMenuExtension extension

A choice acts as a grouping title when it has no key.
no setter

Methods

isFirstSelectedIn(List<Choice<T>> selectedChoice) bool

Available on Choice<T>, provided by the ChoiceMenuExtension extension

Whether this choice occupies the first slot in selectedChoice.
isSelectedIn(List<Choice<T>> selectedChoice) bool

Available on Choice<T>, provided by the ChoiceMenuExtension extension

Whether this choice is currently selected within selectedChoice.