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
)
You can find a code example here.
If you want to see how it looks like, check this video.