Debouncer class

Utility class to debounce actions

Example:

final debouncer = Debouncer(const Duration(milliseconds: 200));

debouncer(() {
  // do something
});

Constructors

Debouncer.new(Duration delay)

Properties

delay Duration
Delay for this debouncer
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Flag indicating that this debouncer is disposed
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(void callback()) → dynamic
dispose() → void
Cancel internal timer and sets disposed flag to true
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processPendingImmediately() → void
Immediately executes debouncer action and resets internal timer
toString() String
A string representation of this object.
inherited

Operators

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