SmartRefresher.builder constructor

SmartRefresher.builder({
  1. Key? key,
  2. required RefreshController controller,
  3. required RefresherBuilder? builder,
  4. bool enablePullDown = true,
  5. bool enablePullUp = false,
  6. bool enableTwoLevel = false,
  7. VoidCallback? onRefresh,
  8. VoidCallback? onLoading,
  9. OnTwoLevel? onTwoLevel,
})

creates a widget help attach the refresh and load more function controller must not be null,builder must not be null this constructor use to handle some special third party widgets,this widget need to pass slivers ,but they are not extends ScrollView,so my widget inner will wrap child to SliverToBoxAdapter,which cause scrollable wrapping scrollable. for example,NestedScrollView is a StalessWidget,it's headerSliversbuilder can return a slivers array,So if we want to do refresh above NestedScrollVIew,we must use this constrctor to implements refresh above NestedScrollView,but for now,NestedScrollView can not support overscroll out of edge

Implementation

SmartRefresher.builder({
  Key? key,
  required this.controller,
  required this.builder,
  this.enablePullDown = true,
  this.enablePullUp = false,
  this.enableTwoLevel = false,
  this.onRefresh,
  this.onLoading,
  this.onTwoLevel,
})  : header = null,
      footer = null,
      child = null,
      scrollController = null,
      scrollDirection = null,
      physics = null,
      reverse = null,
      semanticChildCount = null,
      dragStartBehavior = null,
      cacheExtent = null,
      primary = null,
      super(key: key);