SwipeRefresh constructor

const SwipeRefresh(
  1. SwipeRefreshStyle style, {
  2. required Stream<SwipeRefreshState> stateStream,
  3. required VoidCallback onRefresh,
  4. Key? key,
  5. List<Widget>? children,
  6. SwipeRefreshState? initState,
  7. ScrollController? scrollController,
  8. SliverChildDelegate? childrenDelegate,
  9. EdgeInsets? padding,
  10. Color? indicatorColor,
  11. bool shrinkWrap = false,
  12. ScrollViewKeyboardDismissBehavior? keyboardDismissBehavior,
  13. ScrollPhysics? physics,
  14. Color? backgroundColor,
  15. double? refreshTriggerPullDistance,
  16. double? refreshIndicatorExtent,
  17. RefreshControlIndicatorBuilder? indicatorBuilder,
  18. PlatformWrapper? platform,
  19. double? cacheExtent,
})

Implementation

const SwipeRefresh(
  this.style, {
  required this.stateStream,
  required this.onRefresh,
  Key? key,
  this.children,
  this.initState,
  this.scrollController,
  this.childrenDelegate,
  this.padding,
  this.indicatorColor,
  this.shrinkWrap = false,
  this.keyboardDismissBehavior,
  this.physics,
  Color? backgroundColor,
  double? refreshTriggerPullDistance,
  double? refreshIndicatorExtent,
  RefreshControlIndicatorBuilder? indicatorBuilder,
  PlatformWrapper? platform,
  this.cacheExtent,
})  : backgroundColor = backgroundColor ?? const Color(0xFFFFFFFF),
      refreshTriggerPullDistance = refreshTriggerPullDistance ??
          CupertinoSwipeRefresh.defaultRefreshTriggerPullDistance,
      refreshIndicatorExtent = refreshIndicatorExtent ??
          CupertinoSwipeRefresh.defaultRefreshIndicatorExtent,
      indicatorBuilder = indicatorBuilder ??
          CupertinoSliverRefreshControl.buildRefreshIndicator,
      _platform = platform ?? const PlatformWrapper(),
      super(key: key);