RefreshConfiguration.copyAncestor constructor

RefreshConfiguration.copyAncestor({
  1. Key? key,
  2. required BuildContext context,
  3. required Widget child,
  4. IndicatorBuilder? headerBuilder,
  5. IndicatorBuilder? footerBuilder,
  6. double? dragSpeedRatio,
  7. ShouldFollowContent? shouldFooterFollowWhenNotFull,
  8. bool? enableScrollWhenTwoLevel,
  9. bool? enableBallisticRefresh,
  10. bool? enableBallisticLoad,
  11. bool? enableLoadingWhenNoData,
  12. SpringDescription? springDescription,
  13. bool? enableScrollWhenRefreshCompleted,
  14. bool? enableLoadingWhenFailed,
  15. double? twiceTriggerDistance,
  16. double? closeTwoLevelDistance,
  17. bool? skipCanRefresh,
  18. double? maxOverScrollExtent,
  19. double? maxUnderScrollExtent,
  20. double? topHitBoundary,
  21. double? bottomHitBoundary,
  22. double? headerTriggerDistance,
  23. double? footerTriggerDistance,
  24. bool? enableRefreshVibrate,
  25. bool? enableLoadMoreVibrate,
  26. bool? hideFooterWhenNotFull,
})

Construct RefreshConfiguration to copy attributes from ancestor nodes If the parameter is null, it will automatically help you to absorb the attributes of your ancestor Refresh Configuration, instead of having to copy them manually by yourself.

it mostly use in some stiuation is different the other SmartRefresher in App

Implementation

RefreshConfiguration.copyAncestor({
  Key? key,
  required BuildContext context,
  required this.child,
  IndicatorBuilder? headerBuilder,
  IndicatorBuilder? footerBuilder,
  double? dragSpeedRatio,
  ShouldFollowContent? shouldFooterFollowWhenNotFull,
  bool? enableScrollWhenTwoLevel,
  bool? enableBallisticRefresh,
  bool? enableBallisticLoad,
  bool? enableLoadingWhenNoData,
  SpringDescription? springDescription,
  bool? enableScrollWhenRefreshCompleted,
  bool? enableLoadingWhenFailed,
  double? twiceTriggerDistance,
  double? closeTwoLevelDistance,
  bool? skipCanRefresh,
  double? maxOverScrollExtent,
  double? maxUnderScrollExtent,
  double? topHitBoundary,
  double? bottomHitBoundary,
  double? headerTriggerDistance,
  double? footerTriggerDistance,
  bool? enableRefreshVibrate,
  bool? enableLoadMoreVibrate,
  bool? hideFooterWhenNotFull,
})  : assert(RefreshConfiguration.of(context) != null,
          "search RefreshConfiguration anscestor return null,please  Make sure that RefreshConfiguration is the ancestor of that element"),
      headerBuilder =
          headerBuilder ?? RefreshConfiguration.of(context)!.headerBuilder,
      footerBuilder =
          footerBuilder ?? RefreshConfiguration.of(context)!.footerBuilder,
      dragSpeedRatio =
          dragSpeedRatio ?? RefreshConfiguration.of(context)!.dragSpeedRatio,
      twiceTriggerDistance = twiceTriggerDistance ??
          RefreshConfiguration.of(context)!.twiceTriggerDistance,
      headerTriggerDistance = headerTriggerDistance ??
          RefreshConfiguration.of(context)!.headerTriggerDistance,
      footerTriggerDistance = footerTriggerDistance ??
          RefreshConfiguration.of(context)!.footerTriggerDistance,
      springDescription = springDescription ??
          RefreshConfiguration.of(context)!.springDescription,
      hideFooterWhenNotFull = hideFooterWhenNotFull ??
          RefreshConfiguration.of(context)!.hideFooterWhenNotFull,
      maxOverScrollExtent = maxOverScrollExtent ??
          RefreshConfiguration.of(context)!.maxOverScrollExtent,
      maxUnderScrollExtent = maxUnderScrollExtent ??
          RefreshConfiguration.of(context)!.maxUnderScrollExtent,
      topHitBoundary =
          topHitBoundary ?? RefreshConfiguration.of(context)!.topHitBoundary,
      bottomHitBoundary = bottomHitBoundary ??
          RefreshConfiguration.of(context)!.bottomHitBoundary,
      skipCanRefresh =
          skipCanRefresh ?? RefreshConfiguration.of(context)!.skipCanRefresh,
      enableScrollWhenRefreshCompleted = enableScrollWhenRefreshCompleted ??
          RefreshConfiguration.of(context)!.enableScrollWhenRefreshCompleted,
      enableScrollWhenTwoLevel = enableScrollWhenTwoLevel ??
          RefreshConfiguration.of(context)!.enableScrollWhenTwoLevel,
      enableBallisticRefresh = enableBallisticRefresh ??
          RefreshConfiguration.of(context)!.enableBallisticRefresh,
      enableBallisticLoad = enableBallisticLoad ??
          RefreshConfiguration.of(context)!.enableBallisticLoad,
      enableLoadingWhenNoData = enableLoadingWhenNoData ??
          RefreshConfiguration.of(context)!.enableLoadingWhenNoData,
      enableLoadingWhenFailed = enableLoadingWhenFailed ??
          RefreshConfiguration.of(context)!.enableLoadingWhenFailed,
      closeTwoLevelDistance = closeTwoLevelDistance ??
          RefreshConfiguration.of(context)!.closeTwoLevelDistance,
      enableRefreshVibrate = enableRefreshVibrate ??
          RefreshConfiguration.of(context)!.enableRefreshVibrate,
      enableLoadMoreVibrate = enableLoadMoreVibrate ??
          RefreshConfiguration.of(context)!.enableLoadMoreVibrate,
      shouldFooterFollowWhenNotFull = shouldFooterFollowWhenNotFull ??
          RefreshConfiguration.of(context)!.shouldFooterFollowWhenNotFull,
      super(key: key, child: child);