as Flow
Observe changes to a Realm object. The flow would emit an InitialObject once subscribed and then, on every change to the object an UpdatedObject. If the observed object is deleted from the Realm, the flow would emit a DeletedObject and then will complete, otherwise it will continue running until canceled.
The change calculations will be executed on the thread represented by Configuration.notificationDispatcher.
The flow has an internal buffer of Channel.BUFFERED but if the consumer fails to consume the elements in a timely manner the coroutine scope will be cancelled with a CancellationException.
Return
a flow representing changes to the object.
Throws
if called on a live RealmObject or EmbeddedRealmObject from a write transaction (Realm.write) or on a DynamicRealmObject inside a migration (AutomaticSchemaMigration.migrate).