VerticalListDefaults


public static class VerticalListDefaults


Contains the default values used by VerticalList.

Summary

Public fields

static @NonNull VerticalListDefaults

Public methods

final @NonNull FlingBehavior

Creates and remembers the default fling behavior for a VerticalList that aligns the focus position with list scroll.

final @NonNull PaddingValues

Recommended content padding values for optimal use of available space.

final @NonNull Dp

The maximum height of the fade effects on the sides of the list.

final @NonNull Arrangement.Vertical

Recommended values for the spacing between items.

Public fields

INSTANCE

Added in 1.0.0-alpha04
public static @NonNull VerticalListDefaults INSTANCE

Public methods

flingBehavior

Added in 1.0.0-alpha04
@Composable
public final @NonNull FlingBehavior flingBehavior(@NonNull ListState state)

Creates and remembers the default fling behavior for a VerticalList that aligns the focus position with list scroll.

Parameters
@NonNull ListState state

The ListState to observe for layout and focus information.

Returns
@NonNull FlingBehavior

A FlingBehavior instance that provides focus-aware snapping.

getContentPadding

Added in 1.0.0-alpha04
public final @NonNull PaddingValues getContentPadding()

Recommended content padding values for optimal use of available space.

getScrimMaxHeight

public final @NonNull Dp getScrimMaxHeight()

The maximum height of the fade effects on the sides of the list.

getVerticalArrangement

Added in 1.0.0-alpha04
public final @NonNull Arrangement.Vertical getVerticalArrangement()

Recommended values for the spacing between items.