debounce method

void debounce(
  1. T value
)

Implementation

void debounce(T value) {
  final key = _generateKey();
  _funcDebounce[key]?.cancel();
  _funcDebounce[key] = Timer(Duration(milliseconds: timeout), () {
    _funcDebounce.remove(key)?.cancel();
    target?.call(value);
  });
}