isClosed property

bool get isClosed
inherited

Whether close has been called — true from the moment it starts, not when its teardown ends.

Core's getActiveModel cache is the caller that needs this. It evicts on the close listener, which fires only once the teardown has finished; a call arriving in between would otherwise be handed the model that is going away, and its next session would fail. This lets the cache check.

Defaulted to false, as EmbeddingModel.isClosed is: an implementation that does not answer behaves as before. implements does not inherit the default body, so such an implementation has to declare it.

Implementation

bool get isClosed => false;