throttle abstract method
throttle function to limit the rate at which a callback
is called.
Throttling is often used to control the frequency of function calls,
especially when dealing with user input or events
For example:
ref.throttle(() => myFunction(), duration: Duration(seconds: 6));
input: 1-2-3---4-5-6---7-8-|
result: 1-------4-------7---|
See also:
Implementation
void throttle(
void Function() callback, {
Duration duration = const Duration(milliseconds: 500),
});