isDisposing property

bool isDisposing

Whether this object is in the process of being disposed.

This will become true after dispose is called, but not until all Futures registered via awaitBeforeDispose have resolved, and will become false once the didDispose future completes.

Deprecated: 1.9.0 To be removed: 2.0.0

isOrWillBeDisposed should be used instead.

This getter is useful for Disposable tests, but for public consumption, isOrWillBeDisposed is more useful because it remains true throughout the "awaiting disposal", "disposing", and "disposed" states.

Implementation

@deprecated
bool get isDisposing => _state == DisposableState.disposing;