OptimizedListView<T> constructor

const OptimizedListView<T>({
  1. Key? key,
  2. required List<T> list,
  3. required Widget builder(
    1. BuildContext context,
    2. ValueKey key,
    3. T item
    ),
  4. Axis scrollDirection = Axis.vertical,
  5. bool reverse = false,
  6. ScrollController? controller,
  7. bool? primary,
  8. ScrollPhysics? physics,
  9. Widget onEmpty = const SizedBox.shrink(),
  10. bool shrinkWrap = false,
})

Implementation

const OptimizedListView({
  super.key,
  required this.list,
  required this.builder,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary,
  this.physics,
  this.onEmpty = const SizedBox.shrink(),
  this.shrinkWrap = false,
}) : length = list.length;