throttle method

void throttle()

Implementation

void throttle() {
  final key = _generateKey();
  if (_funcThrottle[key] ?? true) {
    _funcThrottle[key] = false;
    Timer(Duration(milliseconds: timeout), () => _funcThrottle.remove(key));
    target?.call();
  }
}