finalize method

FutureOr<void> finalize({
  1. FutureOr<void> onWaited()?,
})

Finalizes the debouncer and calls the onWaited function.

Implementation

FutureOr<void> finalize({FutureOr<void> Function()? onWaited}) async {
  if (this.cancel()) {
    await this.onWaited?.call();
    await onWaited?.call();
  }
}