I'm trying to create a VerticalScroller that remembers its position when the page is redrawn - I've tried
Copy code
val scrollerPosition: ScrollerPosition = +memo { ScrollerPosition() }
VerticalScroller(scrollerPosition) {
// etc.
}
but it scrollerPosition.value always seems to be 0px
m
Manuel Wrage
01/12/2020, 12:44 PM
You could store the ScrollerPosition in a ViewModel or somewhere else.
I guess in the future compositions will be retained throughout configuration changes.