easyRefresh function

Widget easyRefresh({
  1. required dynamic itemCount,
  2. required IndexedWidgetBuilder itemBuilder,
  3. EasyRefreshController? controller,
  4. OnRefreshCallback? refresh,
  5. OnLoadCallback? load,
  6. num space = 16,
  7. bool slide = true,
  8. bool shrinkWrap = false,
  9. num mainPadding = 0,
  10. num crossPadding = 0,
  11. bool fullLine = true,
  12. double? cacheExtent,
  13. Footer? footer,
  14. Header? header,
})

Implementation

Widget easyRefresh({
  required itemCount,
  required IndexedWidgetBuilder itemBuilder,
  EasyRefreshController? controller,
  OnRefreshCallback? refresh,
  OnLoadCallback? load,
  num space = 16,
  bool slide = true,
  bool shrinkWrap = false,
  num mainPadding = 0,
  num crossPadding = 0,
  bool fullLine = true,
  double? cacheExtent,
  Footer? footer,
  Header? header,
}) {
  List<Widget> child = [
    ListIntervalView(
        itemCount: itemCount,
        itemBuilder: itemBuilder,
        space: space,
        fullLine: fullLine,
        mainPadding: mainPadding,
        crossPadding: crossPadding)
  ];

  return EasyRefresh.custom(
    controller: controller,
    onRefresh: refresh,
    onLoad: load,
    shrinkWrap: shrinkWrap,
    topBouncing: slide,
    bottomBouncing: slide,
    footer: footer,
    header: header,
    cacheExtent: cacheExtent,
    slivers: <Widget>[SliverList(delegate: SliverChildListDelegate(child))],
  );
}