asFlow

abstract fun asFlow(): Flow<ListChange<E>>

Observes changes to the RealmList. The flow will emit a InitialList once subscribed, and then an UpdatedList on every change to the list. The flow will continue running indefinitely until canceled or until the parent object is deleted.

The change calculations will run on the thread represented by RealmConfiguration.Builder.notificationDispatcher.

Return

a flow representing changes to the list.