BaseList.custom constructor
BaseList.custom({
- Key? key,
- required List<
Widget> sliver, - EasyRefreshController? refreshController,
- Widget? header,
- VoidCallback? onRefresh,
- VoidCallback? onLoading,
- ScrollPhysics? physics,
- ScrollController? controller,
- EdgeInsetsGeometry? padding,
- bool shrinkWrap = false,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- bool? primary,
- Clip clipBehavior = Clip.hardEdge,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool noScrollBehavior = false,
- String? restorationId,
- double? cacheExtent,
- RefreshConfig? refreshConfig,
Implementation
BaseList.custom({
super.key,
required super.sliver,
EasyRefreshController? refreshController,
Widget? header,
Widget? footer,
VoidCallback? onRefresh,
VoidCallback? onLoading,
super.physics,
super.controller,
super.padding,
super.shrinkWrap = false,
super.scrollDirection = Axis.vertical,
super.reverse,
super.primary,
super.clipBehavior,
super.dragStartBehavior,
super.noScrollBehavior,
super.restorationId,
super.cacheExtent,
RefreshConfig? refreshConfig,
}) : super(
header: header?.toSliverBox,
footer: footer?.toSliverBox,
refreshConfig: refreshConfig ??
((onRefresh != null || onLoading != null)
? RefreshConfig(
controller: refreshController,
footer: Global().config.pullUpFooter,
header: Global().config.pullDownHeader,
onLoading: onLoading == null
? null
: () async => onLoading.call(),
onRefresh: onRefresh == null
? null
: () async => onRefresh.call())
: null));