Debouncer class
Waits for a pause in activity before executing. Supports leading/trailing edge.
- Inheritance
-
- Object
- CallbackController
- Debouncer
Constructors
Properties
- debugMode → bool
-
finalinherited
- duration → Duration
-
finalinherited
- enabled → bool
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPending → bool
-
Whether an operation is pending.
no setterinherited
- leading → bool
-
final
- name → String?
-
finalinherited
- onMetrics → void Function(Duration waitTime, bool cancelled)?
-
final
- resetOnError → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timer ↔ Timer?
-
getter/setter pairinherited
- trailing → bool
-
final
Methods
-
call(
VoidCallback callback) → void -
Execute the callback with timing control.
override
-
callWithDuration(
VoidCallback callback, Duration customDuration) → void -
Execute with a custom duration (overrides default).
override
-
cancel(
) → void -
Cancel pending operations.
override
-
createTimer(
Duration duration, VoidCallback callback) → Timer -
inherited
-
debugLog(
String message) → void -
inherited
-
dispose(
) → void -
Full cleanup.
override
-
flush(
VoidCallback callback) → void - Execute the callback immediately without waiting.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wrap(
VoidCallback? callback) → VoidCallback? -
Wrap a nullable callback for use with listeners.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited