Package-level declarations

Types

Link copied to clipboard

Bridges LazyListState commands and snapshots to one platform lazy container.

Link copied to clipboard
data class LazyListItemInfo(val index: Int, val key: Any, val contentType: Any?, val offset: Int, val size: Int, val spanIndex: Int = 0, val spanSize: Int = 1)

Describes one visible lazy item in platform-neutral renderer units.

Link copied to clipboard
data class LazyListLayoutInfo(val visibleItemsInfo: List<LazyListItemInfo>, val viewportStartOffset: Int, val viewportEndOffset: Int, val totalItemsCount: Int, val beforeContentPadding: Int, val afterContentPadding: Int, val mainAxisItemSpacing: Int, val orientation: LazyListOrientation, val reverseLayout: Boolean)

Describes the visible viewport of a lazy list or grid.

Link copied to clipboard

Selects a vertical or horizontal main axis for lazy-list layout information.

Link copied to clipboard
class LazyListState(initialFirstVisibleItemIndex: Int = 0, initialFirstVisibleItemScrollOffset: Int = 0)

Owns the observable anchor and layout snapshot for a lazy list or grid.

Link copied to clipboard
data class LazyListStateSnapshot(val firstVisibleItemIndex: Int, val firstVisibleItemScrollOffset: Int, val layoutInfo: LazyListLayoutInfo, val isScrollInProgress: Boolean, val canScrollBackward: Boolean, val canScrollForward: Boolean, val lastScrolledBackward: Boolean, val lastScrolledForward: Boolean)

Captures platform-neutral scroll and layout state for a lazy list or grid at one instant.

Link copied to clipboard
interface PagerConnector

Bridges PagerState commands and immutable snapshots to one platform pager.

Link copied to clipboard

Owns the observable position snapshot and commands for one attached pager.

Link copied to clipboard
data class PagerStateSnapshot(val currentPage: Int, val settledPage: Int, val targetPage: Int, val pageOffset: Float, val pageCount: Int, val isScrollInProgress: Boolean, val canScrollBackward: Boolean, val canScrollForward: Boolean)

Captures one platform-neutral pager position and motion state.

Link copied to clipboard
interface ScrollConnector

Bridges ScrollState commands and snapshots to one eager platform scroll container.

Link copied to clipboard
class ScrollState(initialValue: Int = 0)

Owns the observable offset and commands for one eager scroll container.

Link copied to clipboard
data class ScrollStateSnapshot(val value: Int, val maxValue: Int?, val viewportSize: Int, val isScrollInProgress: Boolean, val canScrollBackward: Boolean, val canScrollForward: Boolean, val lastScrolledBackward: Boolean, val lastScrolledForward: Boolean)

Captures one eager scroll container's offset, range, viewport, and motion at an instant.