debounce function

Debounce debounce(
  1. Function func,
  2. Duration wait,
  3. {bool leading = false,
  4. bool trailing = true,
  5. Duration? maxWait}
)

TopLevel lambda to create Debounce functions.

Implementation

Debounce debounce(
  Function func,
  Duration wait, {
  bool leading = false,
  bool trailing = true,
  Duration? maxWait,
}) =>
    Debounce(
      func,
      wait,
      leading: leading,
      trailing: trailing,
      maxWait: maxWait,
    );