EasyListView constructor

const EasyListView({
  1. Key? key,
  2. required int itemCount,
  3. required IndexedWidgetBuilder itemBuilder,
  4. WidgetBuilder? headerBuilder,
  5. WidgetBuilder? footerBuilder,
  6. bool loadMore = false,
  7. VoidCallback? onLoadMore,
  8. bool loadMoreWhenNoData = false,
  9. WidgetBuilder? loadMoreItemBuilder,
  10. IndexedWidgetBuilder? dividerBuilder,
  11. ScrollPhysics? physics,
  12. NestedScrollViewHeaderSliversBuilder? headerSliverBuilder,
  13. ScrollController? controller,
  14. Widget? foregroundWidget,
  15. EdgeInsetsGeometry? padding,
  16. bool scrollbarEnable = true,
  17. bool isSliverMode = false,
  18. Function? onRefresh,
})

Implementation

const EasyListView({Key? key,
  required this.itemCount,
  required this.itemBuilder,
  this.headerBuilder,
  this.footerBuilder,
  this.loadMore = false,
  this.onLoadMore,
  this.loadMoreWhenNoData = false,
  this.loadMoreItemBuilder,
  this.dividerBuilder,
  this.physics,
  this.headerSliverBuilder,
  this.controller,
  this.foregroundWidget,
  this.padding,
  this.scrollbarEnable = true,
  this.isSliverMode = false,
  this.onRefresh
  // [Not Recommended]
  // Sliver mode will discard a lot of ListView variables (likes physics, controller),
  // and each of items must be sliver.
  // *Sliver mode will build all items when inited. (ListView item is built by lazy)*
}) : super(key: key);