Debounce class
Debounce utility to limit function calls
Example:
final debounced = Debounce(Duration(milliseconds: 300));
debounced(() => print('Called after 300ms'));
final newDebounced = debounced.copyWith(delay: Duration(milliseconds: 500));
Properties
Methods
-
call(
void action()) → void - Executes the function after the delay, canceling any pending execution
-
cancel(
) → void - Cancels any pending execution
-
copyWith(
{Duration? delay}) → Debounce - Creates a copy of this Debounce with the given fields replaced
-
dispose(
) → void - Disposes the debounce instance
-
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