Debounce class

A collection of of static functions to debounce calls to a target function.

Constructors

Debounce()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

clear(Function target) bool
Clear a function that has been debounced. Returns true if a debounced function has been removed.
duration(Duration timeout, Function target, [List positionalArguments = const [], Map<Symbol, dynamic> namedArguments = const {}]) → void
Calls target with the latest supplied positionalArguments and namedArguments after a timeout duration.
milliseconds(int timeoutMs, Function target, [List positionalArguments = const [], Map<Symbol, dynamic> namedArguments = const {}]) → void
Calls duration with a timeout specified in milliseconds.
runAndClear(Function target, [List positionalArguments = const [], Map<Symbol, dynamic> namedArguments = const {}]) → void
Run a function which is already debounced (queued to be run later), but run it now. This also cancels and clears out the timeout for that function.
seconds(int timeoutSeconds, Function target, [List positionalArguments = const [], Map<Symbol, dynamic> namedArguments = const {}]) → void
Calls duration with a timeout specified in seconds.