scrollEvents

Create a Flow of scroll events on the RecyclerView instance.

Note: Created flow keeps a strong reference to the RecyclerView instance until the coroutine that launched the flow collector is cancelled.

Example of usage:

recyclerView.scrollEvents()
.onEach { event ->
// handle recycler view scroll event
}
.launchIn(uiScope)