EasyRefresh.builder constructor
const
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 isScrollEnabled = true,
- bool bottomBouncing = true,
- ScrollBehavior? behavior = const EmptyOverScrollScrollBehavior(),
- required EasyRefreshChildBuilder? builder,
自定义构造器 用法灵活,但需将physics、header和footer放入列表中
Implementation
const 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.isScrollEnabled = true,
this.bottomBouncing = true,
this.behavior = const EmptyOverScrollScrollBehavior(),
required this.builder,
}) : scrollDirection = Axis.vertical,
reverse = false,
child = null,
primary = null,
shrinkWrap = false,
center = null,
anchor = 0.0,
cacheExtent = null,
slivers = null,
semanticChildCount = null,
dragStartBehavior = DragStartBehavior.start,
headerIndex = 0,
firstRefreshWidget = null,
emptyWidget = null,
listKey = null,
super(key: key);