throttle method
Implementation
void throttle(VoidCallback callback) {
final now = DateTime.now();
if (_lastThrottleRun == null ||
now.difference(_lastThrottleRun!) >= throttleDuration) {
_lastThrottleRun = now;
callback();
}
}
void throttle(VoidCallback callback) {
final now = DateTime.now();
if (_lastThrottleRun == null ||
now.difference(_lastThrottleRun!) >= throttleDuration) {
_lastThrottleRun = now;
callback();
}
}