BaseList.custom constructor

BaseList.custom({
  1. Key? key,
  2. required List<Widget> sliver,
  3. EasyRefreshController? refreshController,
  4. Widget? header,
  5. Widget? footer,
  6. VoidCallback? onRefresh,
  7. VoidCallback? onLoading,
  8. ScrollPhysics? physics,
  9. ScrollController? controller,
  10. EdgeInsetsGeometry? padding,
  11. bool shrinkWrap = false,
  12. Axis scrollDirection = Axis.vertical,
  13. bool reverse = false,
  14. bool? primary,
  15. Clip clipBehavior = Clip.hardEdge,
  16. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  17. bool noScrollBehavior = false,
  18. String? restorationId,
  19. double? cacheExtent,
  20. 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));