debouncing library
Classes
-
BackOff<
T> - BackOff is used for holding options for retrying a function.
- Debounce
- Debounce is used to control the frequency of function calls with support for flexible delay and "leading" / "trailing" options.
- DebounceParams
- Configuration of parameters for Debounce.
-
DebounceStreamTransformer<
T> - DebounceStreamTransformer is a stream transformer for use with Debounce.
- ResettableEvent
-
ResettableEvent for events that reset the current debounce or throttle if
resetOnlyPreviousEvent = true— debounce or throttle will be reset, but will not initiate a new call. - Throttle
- Throttle is used to limit the frequency of function calls. This class allows to call a function with a specified delay, and the call will occur no more than once in interval. To control the behavior, you can use the leading and trailing parameters.
- ThrottleParams
- Configuration of parameters for Throttle.
-
ThrottleStreamTransformer<
T> - ThrottleStreamTransformer — a stream transformer for use with Throttle.
Mixins
- DebounceNotifierMixin
- DebounceNotifierMixin for adding debounce (`debounce') to classes inheriting ChangeNotifier.
-
DebounceStateMixin<
T extends StatefulWidget> - DebounceStateMixin for adding debounce (`debounce') to StatefulWidget.
- ThrottleNotifierMixin
-
ThrottleNotifierMixin for adding throttling (
throttle) to ChangeNotifier. -
ThrottleStateMixin<
T extends StatefulWidget> -
ThrottleStateMixin for adding throttling (
throttle) to StatefulWidget.
Functions
-
debounceTransform<
T> ({Duration delay = Debounce.defaultDelay, bool leading = false, bool trailing = true}) → MyEventTransformer< T> -
debounceTransform — event transformer, which postpones
the call until the
delaytime has passed without new events. -
throttleTransform<
T> ({Duration interval = Throttle.interval2Hz, bool leading = true, bool trailing = false}) → MyEventTransformer< T> -
throttleTransform - event transformer for the
Blocthat limits the frequency of event processing.
Typedefs
-
MyEventMapper<
Event> = Stream< Event> Function(Event event) - Signature for a function which converts an incoming event into an outbound stream of events.
-
MyEventTransformer<
Event> = Stream< Event> Function(Stream<Event> events, MyEventMapper<Event> mapper) - Used to change how events are processed.