RefreshIndicator.noSpinner constructor

const RefreshIndicator.noSpinner({
  1. Key? key,
  2. required Widget child,
  3. required RefreshCallback onRefresh,
  4. ValueChanged<RefreshIndicatorStatus?>? onStatusChange,
  5. ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate,
  6. String? semanticsLabel,
  7. String? semanticsValue,
  8. RefreshIndicatorTriggerMode triggerMode = RefreshIndicatorTriggerMode.onEdge,
  9. double elevation = 2.0,
})

Creates a RefreshIndicator with no spinner and calls onRefresh when successfully armed by a drag event.

Events can be optionally listened by using the onStatusChange callback.

Implementation

const RefreshIndicator.noSpinner({
  super.key,
  required this.child,
  required this.onRefresh,
  this.onStatusChange,
  this.notificationPredicate = defaultScrollNotificationPredicate,
  this.semanticsLabel,
  this.semanticsValue,
  this.triggerMode = RefreshIndicatorTriggerMode.onEdge,
  this.elevation = 2.0,
})  : _indicatorType = _IndicatorType.noSpinner,
      // The following parameters aren't used because [_IndicatorType.noSpinner] is being used,
      // which involves showing no spinner, hence the following parameters are useless since
      // their only use is to change the spinner's appearance.
      displacement = 0.0,
      edgeOffset = 0.0,
      color = null,
      backgroundColor = null,
      strokeWidth = 0.0,
      assert(elevation >= 0.0);