ListView<T> constructor

const ListView<T>({
  1. Key? key,
  2. required List<T> items,
  3. Widget selectedBuilder(
    1. T item
    )?,
  4. Widget unselectedBuilder(
    1. T item
    )?,
  5. int initialSelectedIndex = 0,
  6. void onItemSelected(
    1. int index,
    2. T item
    )?,
  7. bool wrapAroundNavigation = false,
  8. ScrollController? controller,
  9. int? itemExtent,
})

Creates a ListView with the given items and optional builders.

Implementation

const ListView({
  super.key,
  required this.items,
  Widget Function(T item)? selectedBuilder,
  Widget Function(T item)? unselectedBuilder,
  this.initialSelectedIndex = 0,
  this.onItemSelected,
  this.wrapAroundNavigation = false,
  this.controller,
  this.itemExtent,
})  : selectedBuilder = selectedBuilder ?? _defaultSelectedBuilder,
      unselectedBuilder = unselectedBuilder ?? _defaultUnselectedBuilder;