RefreshIndicatorModifier constructor

const RefreshIndicatorModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. double displacement = 40.0,
  5. double edgeOffset = 0.0,
  6. required RefreshCallback onRefresh,
  7. Color? color,
  8. Color? backgroundColor,
  9. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  10. String? semanticsLabel,
  11. String? semanticsValue,
  12. double strokeWidth = RefreshProgressIndicator.defaultStrokeWidth,
  13. 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,
});