TappableActionConfig.slider constructor

const TappableActionConfig.slider({
  1. bool requireNetwork = false,
  2. bool debounceTaps = true,
  3. Duration? coolDownDuration,
  4. Duration? delayBeforeFirstTapDuration,
  5. bool disableVisuallyDuringFirstDelay = false,
  6. Duration? minDisabledDuration,
  7. String? groupId,
  8. bool disableVisuallyDuringDebouncing = false,
  9. TapExecutionMode executionMode = TapExecutionMode.rateLimited,
  10. bool executeOnLeadingEdge = true,
  11. bool executeOnTrailingEdge = false,
  12. TapConcurrencyMode concurrencyMode = TapConcurrencyMode.drop,
  13. int rateLimitMaxTokens = 20,
  14. Duration rateLimitRefillInterval = const Duration(milliseconds: 100),
  15. int rateLimitTokensPerRefill = 5,
  16. void onMetrics(
    1. TapMetrics
    )?,
  17. bool enabled = true,
  18. Duration? maxDuration,
  19. String? debugName,
})

For sliders/high-frequency - rate limited with burst capacity.

Implementation

const TappableActionConfig.slider({
  this.requireNetwork = false,
  this.debounceTaps = true,
  this.coolDownDuration,
  this.delayBeforeFirstTapDuration,
  this.disableVisuallyDuringFirstDelay = false,
  this.minDisabledDuration,
  this.groupId,
  this.disableVisuallyDuringDebouncing = false,
  // Slider-specific: rate limited
  this.executionMode = TapExecutionMode.rateLimited,
  this.executeOnLeadingEdge = true,
  this.executeOnTrailingEdge = false,
  this.concurrencyMode = TapConcurrencyMode.drop,
  this.rateLimitMaxTokens = 20,
  this.rateLimitRefillInterval = const Duration(milliseconds: 100),
  this.rateLimitTokensPerRefill = 5,
  this.onMetrics,
  this.enabled = true,
  this.maxDuration,
  this.debugName,
});