EasyRefreshSliverLoadControl constructor
const
EasyRefreshSliverLoadControl({
- Key? key,
- double loadTriggerPullDistance = _defaultLoadTriggerPullDistance,
- double loadIndicatorExtent = _defaultLoadIndicatorExtent,
- required LoadControlBuilder builder,
- Duration? completeDuration,
- OnLoadCallback? onLoad,
- required ValueNotifier<
bool> focusNotifier, - required ValueNotifier<
TaskState> taskNotifier, - required ValueNotifier<
bool> callLoadNotifier, - required bool taskIndependence,
- required ValueNotifier<
double> extraExtentNotifier, - required BindLoadIndicator bindLoadIndicator,
- bool enableControlFinishLoad = false,
- bool enableInfiniteLoad = true,
- bool enableHapticFeedback = false,
- bool safeArea = false,
- EdgeInsets? padding,
Create a new refresh control for inserting into a list of slivers.
The loadTriggerPullDistance
and loadIndicatorExtent
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 onLoad
will still be invoked. By default, builder
shows a CupertinoActivityIndicator.
The onLoad
argument will be called when pulled far enough to trigger
a refresh.
Implementation
const EasyRefreshSliverLoadControl({
Key? key,
this.loadTriggerPullDistance = _defaultLoadTriggerPullDistance,
this.loadIndicatorExtent = _defaultLoadIndicatorExtent,
required this.builder,
this.completeDuration,
this.onLoad,
required this.focusNotifier,
required this.taskNotifier,
required this.callLoadNotifier,
required this.taskIndependence,
required this.extraExtentNotifier,
required this.bindLoadIndicator,
this.enableControlFinishLoad = false,
this.enableInfiniteLoad = true,
this.enableHapticFeedback = false,
this.footerFloat = false,
this.safeArea = false,
this.padding,
}) : assert(loadTriggerPullDistance > 0.0),
assert(loadIndicatorExtent >= 0.0),
assert(
loadTriggerPullDistance >= loadIndicatorExtent,
'The refresh indicator cannot take more space in its final state '
'than the amount initially created by overscrolling.'),
super(key: key);