pageScrollEvents
Create a Flow of page scroll events on the ViewPager instance.
Note: Created flow keeps a strong reference to the ViewPager instance until the coroutine that launched the flow collector is cancelled.
Example of usage:
viewPager.pageScrollEvents()
.onEach { event ->
// handle page scroll event
}
.launchIn(uiScope)
Content copied to clipboard