CallbackController.limiter constructor
CallbackController.limiter({
- required Duration duration,
Runs a callback as soon as possible and limits the calling frequency
to one call per duration.
Use case: Preventing a user from making numerous expensive requests (e.g. by pressing a button widget repeatedly withing a short timespan).
Implementation
factory CallbackController.limiter({required Duration duration}) =>
CallbackLimiter(duration: duration);