debugDisposed property

bool debugDisposed

Whether dispose has been called.

This must only be used when asserts are enabled. Otherwise, it will throw.

Implementation

bool get debugDisposed {
  late bool disposed;
  assert(() {
    disposed = _debugDisposed;
    return true;
  }());
  return disposed;
}