Debouncer class

Utility class for debouncing rapid function calls Prevents excessive state changes and API calls by delaying execution until a specified duration has passed without new calls

Constructors

Debouncer({required Duration duration})

Properties

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

Methods

call(dynamic callback()) → void
Execute a function with debouncing If called again before the duration expires, the previous call is cancelled
cancel() → void
Cancel any pending debounced call
dispose() → void
Dispose the debouncer and clean up resources
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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