getByIndexSync method
Get a single object by the unique index indexName
and key
.
Returns null
if the object does not exist.
If possible, you should use the generated type-safe methods instead.
Implementation
@experimental
OBJ? getByIndexSync(String indexName, IndexKey key) {
return getAllByIndexSync(indexName, [key])[0];
}