rememberLazyListSnapperLayoutInfo

fun rememberLazyListSnapperLayoutInfo(lazyListState: LazyListState, snapOffsetForItem: (layoutInfo: SnapperLayoutInfo, item: SnapperLayoutItemInfo) -> Int = SnapOffsets.Center): LazyListSnapperLayoutInfo

Create and remember a SnapperLayoutInfo which works with LazyListState.

Parameters

lazyListState

The LazyListState to update.

snapOffsetForItem

Block which returns which offset the given item should 'snap' to. See SnapOffsets for provided values.

Sources

Link copied to clipboard