fixed scroll offset after scaling when there are no section headers

This commit is contained in:
Thibault Deckers 2021-01-27 19:24:25 +09:00
parent 8b1d37fc32
commit 10b4ce6898

View file

@ -167,7 +167,7 @@ class SectionedListLayout<T> {
final sectionItemIndex = section.value.indexOf(item);
final column = sectionItemIndex % columnCount;
final row = (sectionItemIndex / columnCount).floor();
final listIndex = sectionLayout.firstIndex + (showHeaders ? 1 : 0) + row;
final listIndex = sectionLayout.firstIndex + 1 + row;
final left = tileExtent * column + spacing * (column - 1);
final top = sectionLayout.indexToLayoutOffset(listIndex);