Skip to content

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

@graemep-nz

Description

@graemep-nz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions