Is there a way to get the page number that the PageView widget has?

Widgets & Design

To make my progress bar work I have created a Code Expression that divides the index of my Page View by 5. My Page View has 6 pages, so I subtracted one to make it work correctly.

The point is that this time I have entered the number of pages in the Page View manually, but I would like to get them automatically. Is there a way to do this? Is the option available and I am not seeing it? Is it possible to create a Custom Code to get the number of pages in the Page View? If so, how?

What have you tried so far?

I ceated a Code Expression that divides the index of my Page View by 5, but I entered the data manually, I would like to be able to save it in a variable that is fed automatically as I add and subtract new pages from my PageView.

Did you check FlutterFlow's Documentation for this topic?
Yes
4
2 replies