AsyncDebouncer class
Async debouncing with auto-cancellation of previous calls. Returns null if cancelled by a newer invocation.
Constructors
- AsyncDebouncer({Duration duration = const Duration(milliseconds: 300), bool enabled = true, bool resetOnError = true, bool debugMode = false, String? name, void onMetrics(Duration executionTime, bool cancelled)?, TimerFactory? timerFactory})
Properties
- debugMode → bool
-
final
- duration → Duration
-
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPending → bool
-
no setter
- name → String?
-
final
- onMetrics → void Function(Duration executionTime, bool cancelled)?
-
final
- resetOnError → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void -
dispose(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run<
T> (Future< T> action()) → Future<T?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited