mirror of https://github.com/flutter/samples.git
fix the issue of generating more than [catalogLength] items when [catalogLength] is not divisible by [itemsPerPage] (#952)
It only checks if [startingIndex] is greater than [catalogLength] in the existing implementation. It doesn't check the index of an item in a page. So it may generate more items than the number specified by [catalogLength]. i.e if [catalogLength] is 113, the existing implementation will still generate 120 items. This PR solves the issue by adding the check for the indices of items in a page.pull/1010/head
parent
296fbac814
commit
7171e92c1f
Loading…
Reference in new issue