getAsFlow

fun <E> MutableReactiveList<E>.getAsFlow(index: Int): Flow<E?>

Creates a Flow that emits the element at the specified index whenever the list changes.

If the index is out of bounds, it emits null. This is useful for observing a specific position in the list without causing an exception if the list shrinks.

Return

A Flow that emits the element at the given index, or null if the index is invalid.

Parameters

index

The index of the element to observe.