useThrottle function
Returns a function that is throttled for duration
after being called.
See also:
- rxmarbles.com/#throttle, which this hook implements.
Implementation
ThrottledCallback useThrottle(Duration duration) {
final throttler = useMemoized(() => _Throttler(duration), [duration]);
return throttler.run;
}