loop_page_view icon indicating copy to clipboard operation
loop_page_view copied to clipboard

Made an example app to show keeping state and dynamic number of pages

Open graemep-nz opened this issue 1 year ago • 0 comments

I needed a dynamic number of pages in my app but I had some problems so I made a small example app to try and reproduce them so I decided to post it as a demo app for loop_page_view. Use at your own risk. It seems to work ok. Tested only for web app using google chrome on Windows. https://github.com/graemep-nz/test_loop_page_view or see the attached file.

The app has either 3 or 4 pages, click the floating button to step around pages. On page 3 there is a button that will add a fourth page image On page 4 there is a button for removing page 4. The debug log shows when initState gets called for each of the four pages. It is occasionally called spuriously e.g. when page 4 is removed, initState gets called for page 1. Also, using shift mouse-scroll does a "next page" if you scroll fast enough and this occasionally results in spurious random initState calls. main.zip

graemep-nz avatar Jun 20 '24 02:06 graemep-nz