asFlow

abstract fun asFlow(predicate: (K, V) -> Boolean? = null): Flow<MapEvent<K, V>>(source)

A Flow of events that can be used to reconstitute the current and future state of the FlowMap.

A predicate can be provided to filter the contents of the map. Upsert will have a null Upsert.oldValue if there was an underlying value that did not previously match, but now does. A Removed will be sent if an entry used to match, but no longer does.

Events can be conflated with conflateKeys.