Debouncer class

The main debouncer class used to create a debouncer

Constructors

Debouncer({Duration timerDuration = const Duration(seconds: 1)})
The debouncer class is used to debounce a function

Properties

hashCode int
The hash code for this object.
no setterinherited
isTimerActive bool
Returns if the timer is currently active
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timerDuration Duration
The duration of the timer
getter/setter pair

Methods

addOnEndFunction(FutureOr<void> func()) → void
Add a function that will be executed after the resetDebounce executable function
addOnInitFunction(FutureOr<void> func()) → void
Add a function that will be executed before the resetDebounce executable function
dispose() → void
Will dispose the timer.
garanteedExecutionAfterDebounceFinished(FutureOr<void> execute()) Future<void>
If you wan't to execute a function and wan't to garantee that if the debounce is active the function will be executed only after the debounce if over
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetDebounce(FutureOr<void> execute()) Future<void>
Reset the debounce with a new function or first funcion.
toString() String
A string representation of this object.
inherited
updateTimer(Duration newDuration) → void
Update the timer with a new duration

Operators

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