PagerScope

interface PagerScope

Scope for HorizontalPager content.

Properties

Link copied to clipboard
abstract val currentPage: Int

Returns the current selected page

Link copied to clipboard
abstract val currentPageOffset: Float

The current offset from the start of currentPage, as a ratio of the page width.

Extensions

Link copied to clipboard
fun PagerScope.calculateCurrentOffsetForPage(page: Int): Float

Calculate the offset for the given page from the current scroll position. This is useful when using the scroll position to apply effects or animations to items.