Open marcglasberg opened 4 years ago
Can you define each of the items proposed below?
const ItemPosition( {@required this.index, @required this.leadingAlignment, @required this.trailingAlignment, @required this.leadingPixelDistance, @required this.trailingPixelDistance, @required this.length, });
How would you be using these to implement something like https://pub.dev/packages/sticky_headers?
I edited the issue to remove the reference to https://pub.dev/packages/sticky_headers. In fact, that package in particular does work for ScrollablePositionedList, because ScrollablePositionedList uses two regular scrolls, and that StickyHeaders can get the necessary pixel position from these.
In any case, there are other uses for knowing the exact pixel distances, instead of only the alignment. For example, I want to create another kind of StickyHeader that spans multiple items.
This is what I am trying to do to implement a sticky header in a vertical scroll:
I can't do that without the pixel information.
The is the current provided information:
const ItemPosition( {@required this.index, @required this.itemLeadingEdge, @required this.itemTrailingEdge});
This is not nearly enough for all kinds of applications. For example, with the above info I can't implement a multi-item sticky-headers.
It should be:
Also, how can I get the length of the viewport?