I want to add a footer to LazyColumn that only appears when all the items are scrolled, but if there are no items in the LazyColumn or no enough items to cover the whole screen, I want the footer to show at the bottom of the screen.
Since we cannot set weights in LazyColumn is there any other way to achieve this?
You can use the
LazyListState#layoutInfoto know if the list is empty or if there is available space at the bottom.Then wrap the
LazyColumnwith aColumnand apply theweightmodifier to the list.