SliverPullRefreshIndicator constructor
const
SliverPullRefreshIndicator({
- Key? key,
- double refreshTriggerPullDistance = 100,
- double refreshIndicatorExtent = 60,
- Duration duration = const Duration(milliseconds: 200),
- RefreshControlIndicatorBuilder? builder = buildRefreshIndicator,
- RefreshCallback? onRefresh,
Create a new refresh indicator 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 CircularProgressIndicator.
The onRefresh argument will be called when pulled far enough to trigger a refresh.
Implementation
const SliverPullRefreshIndicator({
Key? key,
this.refreshTriggerPullDistance = 100,
this.refreshIndicatorExtent = 60,
this.duration = const Duration(milliseconds: 200),
this.builder = buildRefreshIndicator,
this.onRefresh,
}) : assert(refreshTriggerPullDistance > 0.0),
assert(refreshIndicatorExtent >= 0.0),
assert(
refreshTriggerPullDistance >= refreshIndicatorExtent,
'The refresh indicator cannot take more space in its final state '
'than the amount initially created by overscrolling.',
),
super(key: key);