Debounce constructor

Debounce(
  1. void callback(), {
  2. Duration duration = _debounceDuration,
})

Constructs and starts the debouncer.

Implementation

factory Debounce(void Function() callback, {Duration duration = _debounceDuration}) {
  return Debounce._(callback, duration)..debounce();
}