kInfiniteScrollStartPage top-level constant

int const kInfiniteScrollStartPage

A workaround to achieve pseudo-infinite scroll with a default Flutter PageController.

While scrolling forward is infinite, scrolling backwards is limited to the first page. Thus, the first page is set to kInfiniteScrollStartPage to allow for a large number of pages to be scrolled through in either direction.

Implementation

const int kInfiniteScrollStartPage = 500;