useThrottle function

ThrottledCallback useThrottle(
  1. Duration duration
)

Returns a function that is throttled for duration after being called.

See also:

Implementation

ThrottledCallback useThrottle(Duration duration) {
  final throttler = useMemoized(() => _Throttler(duration), [duration]);
  return throttler.run;
}