RefreshIndicatorModifier constructor
const
RefreshIndicatorModifier({
- Key? key,
- Widget? child,
- Key? modifierKey,
- double displacement = 40.0,
- double edgeOffset = 0.0,
- required RefreshCallback onRefresh,
- Color? color,
- Color? backgroundColor,
- ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
- String? semanticsLabel,
- String? semanticsValue,
- double strokeWidth = RefreshProgressIndicator.defaultStrokeWidth,
- RefreshIndicatorTriggerMode triggerMode = RefreshIndicatorTriggerMode.onEdge,
Creates a refresh indicator.
The onRefresh
, child
, and notificationPredicate
arguments must be
non-null. The default
displacement
is 40.0 logical pixels.
The semanticsLabel
is used to specify an accessibility label for this widget.
If it is null, it will be defaulted to MaterialLocalizations.refreshIndicatorSemanticLabel.
An empty string may be passed to avoid having anything read by screen reading software.
The semanticsValue
may be used to specify progress on the widget.
Implementation
const RefreshIndicatorModifier({
super.key,
super.child,
super.modifierKey,
this.displacement = 40.0,
this.edgeOffset = 0.0,
required this.onRefresh,
this.color,
this.backgroundColor,
this.notificationPredicate = defaultScrollNotificationPredicate,
this.semanticsLabel,
this.semanticsValue,
this.strokeWidth = RefreshProgressIndicator.defaultStrokeWidth,
this.triggerMode = RefreshIndicatorTriggerMode.onEdge,
});