isValid property

bool isValid

Gets a value indicating whether this object is managed and represents a row in the database.

If a managed object has been removed from the Realm, it is no longer valid and accessing properties on it will throw an exception. The Object is not valid if its Realm is closed or object is deleted. Unmanaged objects are always considered valid.

Implementation

bool get isValid => isManaged ? realmCore.objectIsValid(this) : true;