public interface RotarySnapLayoutInfoProvider
A provider which connects scrollableState to a rotary input for snapping scroll actions.
This interface defines the essential properties and methods required for a scrollable to be controlled by rotary input and perform a snap action.
Properties
averageItemSize
public val averageItemSize: Float
The average size in pixels of an item within the scrollable. This is used to estimate scrolling distances for snapping when responding to rotary input.
currentItemIndex
public val currentItemIndex: Int
The index of the item that is closest to the center.
currentItemOffset
public val currentItemOffset: Float
The offset in pixels of the currently centered item from its centered position. This value can be positive or negative.
totalItemCount
public val totalItemCount: Int
The total number of items within the scrollable