LazyStaggeredGridLayoutInfo


Information about layout state of lazy staggered grids. Can be retrieved from LazyStaggeredGridState.layoutInfo.

Summary

Public properties

Int

Content padding in pixels applied after the items in scroll direction.

Cmn
Int

Content padding in pixels applied before the items in scroll direction.

Cmn
Int

The spacing between items in scroll direction.

Cmn
Orientation

Orientation of the staggered grid.

Cmn
Int

The total count of items passed to staggered grid.

Cmn
Int

The end offset of the layout's viewport in pixels.

Cmn
IntSize

Layout viewport (content + content padding) size in pixels.

Cmn
Int

The start offset of the layout's viewport in pixels.

Cmn
List<LazyStaggeredGridItemInfo>

The list of LazyStaggeredGridItemInfo per each visible item ordered by index.

Cmn

Public properties

afterContentPadding

val afterContentPaddingInt

Content padding in pixels applied after the items in scroll direction.

beforeContentPadding

val beforeContentPaddingInt

Content padding in pixels applied before the items in scroll direction.

mainAxisItemSpacing

val mainAxisItemSpacingInt

The spacing between items in scroll direction.

orientation

val orientationOrientation

Orientation of the staggered grid.

totalItemsCount

val totalItemsCountInt

The total count of items passed to staggered grid.

viewportEndOffset

val viewportEndOffsetInt

The end offset of the layout's viewport in pixels. You can think of it as a maximum offset which would be visible. It is the size of the lazy grid layout minus beforeContentPadding.

You can use it to understand what items from visibleItemsInfo are fully visible.

viewportSize

val viewportSizeIntSize

Layout viewport (content + content padding) size in pixels.

viewportStartOffset

val viewportStartOffsetInt

The start offset of the layout's viewport in pixels. You can think of it as a minimum offset which would be visible. Can be negative if non-zero beforeContentPadding was applied as the content displayed in the content padding area is still visible.

You can use it to understand what items from visibleItemsInfo are fully visible.

visibleItemsInfo

val visibleItemsInfoList<LazyStaggeredGridItemInfo>

The list of LazyStaggeredGridItemInfo per each visible item ordered by index.