debounce method
void
debounce(
- T value
Implementation
void debounce(T value) {
String key = hashCode.toString();
Timer? timer = _funcDebounce[key];
timer?.cancel();
timer = Timer(Duration(milliseconds: timeout), () {
Timer? t = _funcDebounce.remove(key);
t?.cancel();
target?.call(value);
});
_funcDebounce[key] = timer;
}