throttle method

void throttle()

Implementation

void throttle() async {
  String key = hashCode.toString();
  bool enable = _funcThrottle[key] ?? true;
  if (enable) {
    _funcThrottle[key] = false;
    Timer(Duration(milliseconds: timeout), () {
      _funcThrottle.remove(key);
    });
    target?.call();
  }
}