WrapperEasyRefresh.builder constructor

WrapperEasyRefresh.builder({
  1. Key? key,
  2. required ERChildBuilder? childBuilder,
  3. EasyRefreshController? controller,
  4. Header? header,
  5. Footer? footer,
  6. NotRefreshHeader? notRefreshHeader,
  7. NotLoadFooter? notLoadFooter,
  8. FutureOr onRefresh()?,
  9. FutureOr onLoad()?,
  10. SpringDescription? spring,
  11. FrictionFactor? frictionFactor,
  12. bool simultaneously = false,
  13. bool canRefreshAfterNoMore = false,
  14. bool canLoadAfterNoMore = false,
  15. bool resetAfterRefresh = false,
  16. bool refreshOnStart = false,
  17. Header? refreshOnStartHeader,
  18. double callRefreshOverOffset = 20,
  19. double callLoadOverOffset = 20,
  20. StackFit fit = StackFit.loose,
  21. Clip clipBehavior = Clip.hardEdge,
  22. ERScrollBehaviorBuilder? scrollBehaviorBuilder,
  23. ScrollController? scrollController,
  24. Axis? triggerAxis,
  25. bool headerClamping = false,
  26. bool footerClamping = false,
  27. Color? headerBackgroundColor,
  28. Color? footerBackgroundColor,
  29. RefreshNotifier? refreshNotifier,
})

Implementation

WrapperEasyRefresh.builder({
  Key? key,
  required ERChildBuilder? childBuilder,
  EasyRefreshController? controller,
  Header? header,
  Footer? footer,
  NotRefreshHeader? notRefreshHeader,
  NotLoadFooter? notLoadFooter,
  FutureOr Function()? onRefresh,
  FutureOr Function()? onLoad,
  SpringDescription? spring,
  FrictionFactor? frictionFactor,
  bool simultaneously = false,
  bool canRefreshAfterNoMore = false,
  bool canLoadAfterNoMore = false,
  bool resetAfterRefresh = false,
  bool refreshOnStart = false,
  Header? refreshOnStartHeader,
  double callRefreshOverOffset = 20,
  double callLoadOverOffset = 20,
  StackFit fit = StackFit.loose,
  Clip clipBehavior = Clip.hardEdge,
  ERScrollBehaviorBuilder? scrollBehaviorBuilder,
  ScrollController? scrollController,
  Axis? triggerAxis,
  bool headerClamping = false,
  bool footerClamping = false,
  Color? headerBackgroundColor,
  Color? footerBackgroundColor,
  RefreshNotifier? refreshNotifier,
}) : super.builder(
        key: key,
        childBuilder: childBuilder,
        controller: controller ?? refreshNotifier?.easyRefreshController,
        header: header ??
            _header?.call(headerClamping, headerBackgroundColor) as Header? ??
            BallPulseHeader(
              clamping: headerClamping,
              backgroundColor: headerBackgroundColor,
            ),
        footer: footer ??
            _footer?.call(footerClamping, footerBackgroundColor) as Footer? ??
            BallPulseFooter(
              clamping: footerClamping,
              backgroundColor: footerBackgroundColor,
            ),
        onRefresh: onRefresh ?? refreshNotifier?.refresh,
        onLoad: onLoad ?? refreshNotifier?.loadMore,
        spring: spring,
        frictionFactor: frictionFactor,
        simultaneously: simultaneously,
        canRefreshAfterNoMore: canRefreshAfterNoMore,
        canLoadAfterNoMore: canLoadAfterNoMore,
        resetAfterRefresh: resetAfterRefresh,
        refreshOnStart: refreshOnStart,
        refreshOnStartHeader: refreshOnStartHeader,
        callRefreshOverOffset: callRefreshOverOffset,
        callLoadOverOffset: callLoadOverOffset,
        fit: fit,
        clipBehavior: clipBehavior,
        scrollBehaviorBuilder: scrollBehaviorBuilder,
        scrollController: scrollController,
        triggerAxis: triggerAxis,
      );