EasyRefresh constructor

const EasyRefresh({
  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. Widget? firstRefreshWidget,
  13. int headerIndex = 0,
  14. Widget? emptyWidget,
  15. bool topBouncing = true,
  16. bool bottomBouncing = true,
  17. bool isScrollEnabled = true,
  18. ScrollBehavior? behavior = const EmptyOverScrollScrollBehavior(),
  19. required Widget? child,
})

默认构造器 将child转换为CustomScrollView可用的slivers

Implementation

const EasyRefresh({
  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.firstRefreshWidget,
  this.headerIndex = 0,
  this.emptyWidget,
  this.topBouncing = true,
  this.bottomBouncing = true,
  this.isScrollEnabled = true,
  this.behavior = const EmptyOverScrollScrollBehavior(),
  required this.child,
})  : scrollDirection = Axis.vertical,
      reverse = false,
      builder = null,
      primary = null,
      shrinkWrap = false,
      center = null,
      anchor = 0.0,
      cacheExtent = null,
      slivers = null,
      semanticChildCount = null,
      dragStartBehavior = DragStartBehavior.start,
      listKey = null,
      super(key: key);