EasyRefresh.builder constructor

EasyRefresh.builder({
  1. Key? key,
  2. EasyRefreshController? controller,
  3. OnRefreshCallback? onRefresh,
  4. OnLoadCallback? onLoad,
  5. bool enableControlFinishRefresh = false,
  6. bool enableControlFinishLoad = false,
  7. bool taskIndependence = false,
  8. ScrollController? scrollController,
  9. Header? header,
  10. Footer? footer,
  11. bool firstRefresh = false,
  12. bool topBouncing = true,
  13. bool bottomBouncing = true,
  14. ScrollBehavior? behavior = const EmptyOverScrollScrollBehavior(),
  15. required EasyRefreshChildBuilder? builder,
})

自定义构造器 用法灵活,但需将physics、header和footer放入列表中

Implementation

EasyRefresh.builder({
  Key? key,
  this.controller,
  this.onRefresh,
  this.onLoad,
  this.enableControlFinishRefresh = false,
  this.enableControlFinishLoad = false,
  this.taskIndependence = false,
  this.scrollController,
  this.header,
  this.footer,
  this.firstRefresh = false,
  this.topBouncing = true,
  this.bottomBouncing = true,
  this.behavior = const EmptyOverScrollScrollBehavior(),
  required this.builder,
})   : this.scrollDirection = Axis.vertical,
      this.reverse = false,
      this.child = null,
      this.primary = null,
      this.shrinkWrap = false,
      this.center = null,
      this.anchor = 0.0,
      this.cacheExtent = null,
      this.slivers = null,
      this.semanticChildCount = null,
      this.dragStartBehavior = DragStartBehavior.start,
      this.headerIndex = 0,
      this.firstRefreshWidget = null,
      this.emptyWidget = null,
      this.listKey = null,
      super(key: key);