observe Entity
Observes a single entity of type T by its id, emitting the updated entity on changes.
Return
A Flow emitting the entity or null if not found.
Example:
storage.observeEntity(SampleUserProfile::class, "u1").collect { /* react */}Content copied to clipboard
Parameters
clazz
The KClass of the entity type.
id
The unique identifier of the entity.
Type Parameters
T
The entity type (must be annotated with @Entity).