checkObjectDisposed static method
- @protected
- @visibleForTesting
- Disposable disposable, [
- String? methodName
It throws DisposedException if disposable was disposed.
DisposedException will be with methodName if it is not null.
Implementation
@protected
@visibleForTesting
static bool checkObjectDisposed(Disposable disposable, [String? methodName]) {
if (_disposedObjects[disposable] ?? false) {
throw DisposedException(describeIdentity(disposable), methodName);
}
return true;
}