dispose method

Future<void> dispose()

Implementation

Future<void> dispose() async {
  if (_disposed) return;
  // cancel a schedule task
  _debouncer?.cancel();
  // cancel the events susbcription
  await _subscription.cancel();
  _disposed = true;
}