CupertinoSliverSwipeRefresh constructor
CupertinoSliverSwipeRefresh({
- double refreshTriggerPullDistance = 100.0,
- double refreshIndicatorExtent = 60.0,
- RefreshControlIndicatorBuilder? builder,
- bool? enabled,
- Color? backgroundColor,
- SwipeRefreshCallback? onRefresh,
- Key? key,
Create a new refresh control for inserting into a list of slivers.
The refreshTriggerPullDistance and refreshIndicatorExtent arguments must not be null and must be >= 0.
The builder
argument may be null, in which case no indicator UI will be
shown but the onRefresh will still be invoked. By default, builder
shows a CupertinoActivityIndicator.
The onRefresh argument will be called when pulled far enough to trigger a refresh.
Implementation
CupertinoSliverSwipeRefresh({
this.refreshTriggerPullDistance = 100.0,
this.refreshIndicatorExtent = 60.0,
RefreshControlIndicatorBuilder? builder,
bool? enabled,
Color? backgroundColor,
this.onRefresh,
Key? key,
}) : _key = key,
builder = builder ??
((
context,
refreshState,
pulledExtent,
refreshTriggerPullDistance,
refreshIndicatorExtent,
) =>
buildRefreshIndicator(
context,
refreshState,
pulledExtent,
refreshTriggerPullDistance,
refreshIndicatorExtent,
enabled ?? onRefresh != null,
backgroundColor,
)),
super(key: null);