RefreshableLazyList

data class RefreshableLazyList(val isVertical: Boolean, val onViewportChanged: (firstVisibleItemIndex: Int, lastVisibleItemIndex: Int) -> Unit, val itemsBefore: Int, val itemsAfter: Int, val refreshing: Boolean, val onRefresh: () -> Unit?, val width: Constraint, val height: Constraint, val margin: Margin, val crossAxisAlignment: CrossAxisAlignment, val scrollItemIndex: ScrollItemIndex, val pullRefreshContentColor: UInt, val placeholder: () -> Unit, val items: () -> Unit)

Constructors

Link copied to clipboard
constructor(isVertical: Boolean, onViewportChanged: (firstVisibleItemIndex: Int, lastVisibleItemIndex: Int) -> Unit, itemsBefore: Int, itemsAfter: Int, refreshing: Boolean, onRefresh: () -> Unit?, width: Constraint, height: Constraint, margin: Margin, crossAxisAlignment: CrossAxisAlignment, scrollItemIndex: ScrollItemIndex, pullRefreshContentColor: UInt, placeholder: () -> Unit, items: () -> Unit)

Properties

Link copied to clipboard

If isVertical, sets the default horizontal alignment for items in this list. Else, sets the default vertical alignment for items in this list.

Link copied to clipboard

Sets whether the list's height will wrap its contents (Constraint.Wrap) or match the height of its parent (Constraint.Fill).

Link copied to clipboard

Whether the list should be vertically oriented.

Link copied to clipboard
val items: () -> Unit

The window of items to be inflated by the native lazy list widget implementation. The window is defined as a sequential subset of the composables emitted in items. These composables are created by incrementally passing a range of indices to the user-defined item factories, as specified in the LazyListScope functions.

Link copied to clipboard

The number of un-emitted items after the items window.

Link copied to clipboard

The number of un-emitted items before the items window.

Link copied to clipboard

Applies margin (space) around the list.

Link copied to clipboard
val onRefresh: () -> Unit?

Called when a swipe gesture triggers a pull-to-refresh.

Link copied to clipboard
val onViewportChanged: (firstVisibleItemIndex: Int, lastVisibleItemIndex: Int) -> Unit

Invoked when the user has scrolled the list, such that the firstVisibleItemIndex or the lastVisibleItemIndex has changed. When the user performs a fling, onViewportChanged will be invoked multiple times.

Link copied to clipboard
val placeholder: () -> Unit

A block which describes the content of each placeholder item.

Link copied to clipboard

The color of the pull-to-refresh indicator as an ARGB color int.

Link copied to clipboard

Whether or not the list should show the pull-to-refresh indicator.

Link copied to clipboard

The last ScrollItemIndex programmatically requested by the user. The native lazy list widget implementation will scroll itself such that the item index will be at the start of the viewport.

Link copied to clipboard

Sets whether the list's width will wrap its contents (Constraint.Wrap) or match the width of its parent (Constraint.Fill).