EasyRefresh.builder constructor
EasyRefresh.builder({
- Key? key,
- EasyRefreshController? controller,
- OnRefreshCallback? onRefresh,
- OnLoadCallback? onLoad,
- bool enableControlFinishRefresh = false,
- bool enableControlFinishLoad = false,
- bool taskIndependence = false,
- ScrollController? scrollController,
- Header? header,
- bool firstRefresh = false,
- bool topBouncing = true,
- bool bottomBouncing = true,
- ScrollBehavior? behavior = const EmptyOverScrollScrollBehavior(),
- 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);