EnListView<T> constructor

EnListView<T>({
  1. List<T>? items,
  2. Widget itemView(
    1. ContextIndexItem<T>
    )?,
  3. Widget? lastItemView(
    1. BuildContext
    )?,
  4. FutureOr<void> onLoadMore()?,
  5. Future<void> onRefresh()?,
  6. NullableIndexedWidgetBuilder? itemBuilder,
  7. int? itemCount,
  8. IndexedWidgetBuilder? separatorBuilder,
  9. bool separator = true,
  10. double separatorIndentStart = 0,
  11. double separatorIndentEnd = 0,
  12. ScrollController? controller,
  13. bool? primary,
  14. ScrollPhysics? physics = const AlwaysScrollableScrollPhysics(),
  15. bool shrinkWrap = true,
  16. EdgeInsetsGeometry? padding,
  17. double? itemExtent,
  18. double? itemExtentBuilder(
    1. int,
    2. SliverLayoutDimensions
    )?,
  19. Widget? prototypeItem,
  20. int? findChildIndexCallback(
    1. Key
    )?,
  21. bool addAutomaticKeepAlives = true,
  22. bool addRepaintBoundaries = true,
  23. bool addSemanticIndexes = true,
  24. double? cacheExtent,
  25. int? semanticChildCount,
  26. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  27. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  28. String? restorationId,
  29. Key? key,
})

Implementation

EnListView({
  this.items,
  this.itemView,
  this.lastItemView,
  this.onLoadMore,
  this.onRefresh,
  this.itemBuilder,
  this.itemCount,
  IndexedWidgetBuilder? separatorBuilder,
  bool separator = true,
  double separatorIndentStart = 0,
  double separatorIndentEnd = 0,
  ScrollController? controller,
  this.primary,
  this.physics = const AlwaysScrollableScrollPhysics(),
  this.shrinkWrap = true,
  this.padding,
  this.itemExtent,
  this.itemExtentBuilder,
  this.prototypeItem,
  this.findChildIndexCallback,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.cacheExtent,
  this.semanticChildCount,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.restorationId,
  super.key,
})  : this.controller = controller ?? ScrollController(),
      this.separatorBuilder = _makeSepBuilder(separatorBuilder, separator, separatorIndentStart, separatorIndentEnd),
      super() {
  if (onLoadMore != null) {
    this.controller.addListener(_checkScrollBottom);
  }
}