TappableActionConfig constructor
const
TappableActionConfig({
- bool requireNetwork = true,
- bool debounceTaps = true,
- Duration? coolDownDuration,
- Duration? delayBeforeFirstTapDuration,
- bool disableVisuallyDuringFirstDelay = true,
- Duration? minDisabledDuration,
- String? groupId,
- bool disableVisuallyDuringDebouncing = true,
- TapExecutionMode executionMode = TapExecutionMode.throttle,
- bool executeOnLeadingEdge = true,
- bool executeOnTrailingEdge = false,
- TapConcurrencyMode concurrencyMode = TapConcurrencyMode.drop,
- int rateLimitMaxTokens = 10,
- Duration rateLimitRefillInterval = const Duration(seconds: 1),
- int rateLimitTokensPerRefill = 5,
- void onMetrics()?,
- bool enabled = true,
- Duration? maxDuration,
- 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,
});