Debouncer<T> class
Debounces value changes by updating onChanged
, nextValue
, and values
only after duration has elapsed without additional changes.
- Inheritance
-
- Object
- Observable<
T> - Debouncer
Constructors
- Debouncer.new(Duration duration, {required T initialValue, void onChanged(T value)?, bool checkEquality = true})
Properties
- canceled → bool
-
no setterinherited
- checkEquality → bool
-
If true, setting the
value
will only notifiy if the new value is different than the current value.finalinherited - duration → Duration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
nextValue
→ Future<
T> -
no setterinherited
- onChanged → void Function(T value)?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The most recent value, without waiting for the debounce timer to expire.
getter/setter pairinherited-setteroverride-getter
-
values
→ Stream<
T> -
no setterinherited
Methods
-
cancel(
) → void -
Permanently disables this observable. Further changes to value will be
ignored, the outputs
onChanged
,nextValue
, andvalues
will not be called again.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
T val) → void -
override
-
setValue(
T val) → void -
Alias for
value
setter. Good for passing to a Future or Stream.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited