InnerDebounce class abstract

A static class for handling method call debouncing.

Constructors

InnerDebounce()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAllDebounce() → void
Cancels all active debouncers.
cancelAllRateLimit() → void
Cancels all active rate limiters.
cancelAllThrottles() → void
Cancels all active throttles.
cancelDebounce(String tag) → void
Cancels any active debounce operation with the given tag.
cancelRateLimit(String tag) → void
Cancels any active rate limiter with the given tag.
cancelThrottle(String tag) → void
Cancels any active throttle with the given tag.
debounce(String tag, Duration duration, VoidCallback onExecute) → void
Will delay the execution of onExecute with the given duration. If another call to debounce() with the same tag happens within this duration, the first call will be cancelled and the debouncer will start waiting for another duration before executing onExecute.
fireDebounce(String tag) → void
Fires the callback associated with tag immediately. This does not cancel the debounce timer, so if you want to invoke the callback and cancel the debounce timer, you must first call fire(tag) and then cancel(tag).
fireDebounceEnd(String tag) → void
Fires the debounce action associated with the given tag and then cancels the debounce.
getDebounceTags() Iterable<String>
Returns a list of active debouncers.
getRateLimitTags() Iterable<String>
Returns the tags of the active rate limiters.
getThrottleTags() Iterable<String>
Returns a list of all active throttle tags.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rateLimit(String tag, Duration duration, VoidCallback onExecute, {VoidCallback? onAfter}) bool
Will execute onExecute immediately and record additional attempts to call rateLimit with the same tag happens until the given duration has passed when it will execute with the last attempt.
throttle(String tag, Duration duration, VoidCallback onExecute, {VoidCallback? onAfter}) bool
Will execute onExecute immediately and ignore additional attempts to call throttle with the same tag happens for the given duration.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited