throttle method
Implementation
void throttle(VoidCallback callback, Duration duration) {
if (!_throttled) {
callback();
_throttled = true;
_throttleTimer?.cancel();
_throttleTimer = Timer(duration, () {
_throttled = false;
});
}
}