ListBuilder<T> constructor

const ListBuilder<T>({
  1. Key? key,
  2. Axis scrollDirection = Axis.vertical,
  3. bool reverse = false,
  4. ScrollController? controller,
  5. bool? primary,
  6. ScrollPhysics? physics,
  7. bool shrinkWrap = false,
  8. EdgeInsetsGeometry? padding,
  9. List<Widget>? top,
  10. List<Widget>? insert,
  11. int insertPosition = 0,
  12. List<Widget>? bottom,
  13. double? itemExtent,
  14. required List<T> source,
  15. required List<Widget>? builder(
    1. BuildContext context,
    2. T item
    ),
  16. bool addAutomaticKeepAlives = true,
  17. bool addRepaintBoundaries = true,
  18. bool addSemanticIndexes = true,
  19. double? cacheExtent,
  20. int? semanticChildCount,
  21. bool listenWhenListenable = true,
  22. bool loading(
    1. T item
    )?,
  23. double loadingOpacity = 0.25,
  24. Color? indicatorColor,
  25. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  26. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  27. String? restorationId,
  28. Clip clipBehavior = Clip.hardEdge,
})

Implementation

const ListBuilder({
  Key? key,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.top,
  this.insert,
  this.insertPosition = 0,
  this.bottom,
  this.itemExtent,
  required this.source,
  required this.builder,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.cacheExtent,
  this.semanticChildCount,
  this.listenWhenListenable = true,
  this.loading,
  this.loadingOpacity = 0.25,
  this.indicatorColor,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.restorationId,
  this.clipBehavior = Clip.hardEdge,
})  : _topLength = top.length,
      _length = top.length + source.length + bottom.length + insert.length,
      _topSourcelength = top.length + source.length + insert.length,
      super(key: key);