debounceNullary function

DebouncedNullaryFunction debounceNullary(
  1. void callback(),
  2. Duration delay
)

Wraps debounce so that it can be called without any arguments

Implementation

DebouncedNullaryFunction debounceNullary(void callback(), Duration delay) {
  var function = debounce((_) => callback(), delay);
  return () => function(null);
}