UDebouncer class

Runs only the last call after a quiet delay, e.g. search-as-you-type. final UDebouncer d = UDebouncer(delay: 400.ms); d.run(search);

Constructors

UDebouncer({required Duration delay})
Makes a debouncer that waits delay after the last call.

Properties

delay → Duration
How long to wait after the last call.
final
hashCode → int
The hash code for this object.
no setterinherited
isPending → bool
True while a call is waiting to run.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Drops the waiting call.
dispose() → void
Same as cancel(); call it in your State.dispose().
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(void action()) → void
Schedules action, cancelling the one waiting before it. debouncer.run(() => search(text))
toString() → String
A string representation of this object.
inherited

Operators

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