DirectSelectList<T> constructor
DirectSelectList<T> ({
- Key? key,
- required List<
T> values, - required DirectSelectItemsBuilder<
T> itemBuilder, - dynamic onItemSelectedListener(
- T value,
- int selectedIndex,
- BuildContext context
- Decoration? focusedItemDecoration,
- int defaultItemIndex = 0,
- VoidCallback? onUserTappedListener,
Implementation
DirectSelectList({
Key? key,
required List<T> values,
required DirectSelectItemsBuilder<T> itemBuilder,
this.onItemSelectedListener,
this.focusedItemDecoration,
this.defaultItemIndex = 0,
this.onUserTappedListener,
}) : items = values.map((val) => itemBuilder(val)).toNotNullableList(),
selectedItem = ValueNotifier<int>(defaultItemIndex),
assert(defaultItemIndex + 1 <= values.length + 1),
super(key: key);