Debounce class

The Debounce class provides a mechanism to debounce function calls, ensuring that the function is only invoked after a specified duration of inactivity.

Constructors

Debounce()

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

cancel() → void
Cancels any pending debounced or throttled callbacks.
debounce(Duration duration, dynamic onDebounce(), {bool isLeadingEdge = false, BehaviorType type = BehaviorType.trailingEdge}) → void
Debounce the provided callback function by canceling any existing timer and scheduling a new timer to invoke the callback after the specified duration of inactivity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
throttle(Duration duration, dynamic onThrottle(), {BehaviorType type = BehaviorType.leadingEdge}) → void
Throttles the provided onThrottle function by executing it once, and preventing further invocations within the specified duration.
toString() String
A string representation of this object.
inherited

Operators

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