void debounce(String jobName, void callback(), {int waitTime})

Call debounce to collapse multiple requests for a named task into one invocation which is made after the wait time has elapsed with no new request. If no wait time is given, the callback will be called at microtask timing (guaranteed before paint).

Source

void debounce(String jobName, void callback(), {int waitTime}) {
  callback = Zone.current.bindCallback(callback);
  jsElement.callMethod('debounce', [jobName, callback, waitTime]);
}