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 lists without a title.

final @NonNull PaddingValues

Recommended content padding values for lists with a title.

final @NonNull Dp

Recommended value for the distance between items.

final @NonNull Dp

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

final @NonNull Arrangement.Vertical

Recommended values for the vertical arrangement.

Public fields

INSTANCE

Added in 1.0.0-alpha06
public static @NonNull VerticalListDefaults INSTANCE

Public methods

flingBehavior

Added in 1.0.0-alpha06
@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-alpha06
public final @NonNull PaddingValues getContentPadding()

Recommended content padding values for lists without a title.

getContentPaddingWithTitle

Added in 1.0.0-alpha06
public final @NonNull PaddingValues getContentPaddingWithTitle()

Recommended content padding values for lists with a title.

getItemSpacing

public final @NonNull Dp getItemSpacing()

Recommended value for the distance between items.

See also
VerticalArrangement

for the default arrangement that uses this spacing.

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-alpha06
public final @NonNull Arrangement.Vertical getVerticalArrangement()

Recommended values for the vertical arrangement.