Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.3 KB

LazyColum_with_scrollbar.md

File metadata and controls

31 lines (26 loc) · 1.3 KB

LazyColumnWithScrollbar

How to use

To implement the LazyColumn with a scrollbar you should call this Composable function:

/* The parameters below, are the same (some are missing though) as a regular LazyColumn implementation */
fun <T> LazyColumnWithScrollbar(
    data: List<T>,
    modifier: Modifier = Modifier,
    state: LazyListState = rememberLazyListState(),
    contentPadding: PaddingValues = PaddingValues(0.dp),
    horizontalAlignment: Alignment.Horizontal = Alignment.Start,
    flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(),
    
    /* The scrollbar rendering settings */
    settings: LazyColumnScrollbarSettings = LazyColumnScrollbarSettings(),
    
    content: LazyListScope.() -> Unit
)

Examples

You can find a code example here.

If you want to see how it looks like, check this video.