disposedBy method

void disposedBy(
  1. DisposeScope disposeScope
)

Adds this process to disposeScope.

It will be killed when disposeScope is disposed.

Implementation

void disposedBy(DisposeScope disposeScope) {
  disposeScope.addDispose(() async => kill());
}