DirectSelectList<T> constructor

DirectSelectList<T>({
  1. Key? key,
  2. required List<T> values,
  3. required DirectSelectItemsBuilder<T> itemBuilder,
  4. dynamic onItemSelectedListener(
    1. T value,
    2. int selectedIndex,
    3. BuildContext context
    )?,
  5. Decoration? focusedItemDecoration,
  6. int defaultItemIndex = 0,
  7. 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);