TappableActionConfig constructor

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

Implementation

const TappableActionConfig({
  // Existing
  this.requireNetwork = true,
  this.debounceTaps = true,
  this.coolDownDuration,
  this.delayBeforeFirstTapDuration,
  this.disableVisuallyDuringFirstDelay = true,
  this.minDisabledDuration,
  this.groupId,
  this.disableVisuallyDuringDebouncing = true,
  // New
  this.executionMode = TapExecutionMode.throttle,
  this.executeOnLeadingEdge = true,
  this.executeOnTrailingEdge = false,
  this.concurrencyMode = TapConcurrencyMode.drop,
  this.rateLimitMaxTokens = 10,
  this.rateLimitRefillInterval = const Duration(seconds: 1),
  this.rateLimitTokensPerRefill = 5,
  this.onMetrics,
  this.enabled = true,
  this.maxDuration,
  this.debugName,
});