Tgo1014

    Tgo1014

    1 year ago
    How can I know if a
    ScrollableState
    is scrollable aka all the content is already being shown?
    matvei

    matvei

    1 year ago
    ScrollableState
    itself has nothing to do with layout, so this information is not really there and is not accessible. Other states and use ScrollableState, eg.
    LazyListState
    and
    ScrollState
    contain this information in different shapes, e.g
    ScrollState::maxValue
    or
    LazyListState:layoutInfo
    Tgo1014

    Tgo1014

    1 year ago
    Sorry, I was actually talking about
    ScrollState
    , my bad. I’m using
    maxValue
    to auto scroll but I want to hide the button if all content is already fitting the screen, I couldn’t figure how can I do this using
    ScrollState
    matvei

    matvei

    1 year ago
    If content fits the screen,
    maxValue
    would be 0, as there's no place for scrolling
    Tgo1014

    Tgo1014

    1 year ago
    That works! Thanks Matvei!