Skip to content

[Feature Request] Add scrollTo with align by trailingEdge, or add clamp to ItemScrollController.scrollTo #279

Open
@frogman1189

Description

@frogman1189

Currently I wish to be able to scroll to the bottom of the ScrollablePositionedList programmatically. You can do so with scrollTo if you know how many items are in the list. However scrollTo aligns the item by the leading edge. This forces you to have to know (or calculate) the size of the widget, and the space in which the list is so you can calculate the correct leadingEdge alignment. It is much simpler therefore to be able to align by the trailing edge.

Looking through the library code it looked extremely difficult to add the ability to align by the trailing edge. As a work around I attempted to scrollTo the last item with the alignment set to 0, however found no clamping ability due to you using animateTo.
If you change animateTo to moveTo you open up the ability to use clamping, which I imagine would have other applications as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions