Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
graemep-nz opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@graemep-nz
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant