RangeError Occurrence with PageView in FlutterFlow

Troubleshooting

Hello, I would like to ask for your help regarding the issue I am experiencing using PageView on FlutterFlow.

Problem situation:

- Using FlutterFlow, we are implementing a multi-page PageView.

- PageView's Initial Page is set to 0.

- The data received by API calls from the previous page is placed in a variable called routefeedbackList and is being delivered as a parameter to the current page.

- The data is normally assigned to the routefeedbackList, and the list length is set correctly. However, a RangeError occurs when you turn PageView over.

Error message:

```

RangeError(index): Index out of range: index should be less than 1: 1

```

- An error occurs outside the index range, especially on the first (index 0) and subsequent pages (index 2,3,4, etc.) (index 1 works fine)

Additional Questions:

- I've been told that there could be an asynchronous problem in the process where the value passed as a parameter is assigned to the Generator Variable. What can happen in the process if the value is not assigned properly before the page is built?

- What are some ways in FlutterFlow that I can check if the data is allocated normally before the page is built? Other than how to display the loading screen, I'm curious about how to make sure I get and use the data before the page is built.

- I would like to know if there are any bugs or known issues related to this in your current version of FlutterFlow.

Any help would be appreciated!

What have you tried so far?

Current verification and attempts:

1. Initial Page Settings: PageView has set the Initial Page to 0, but the problem still occurs.

2. Check Data: We have verified that the rootinefeedbackList has data in it. The list is 6 lengths.

3. Asynchronous loading issue: I decided that the process of assigning parameter-delivered values to the Generator Variable could be asynchronous, so I tried to display the loading widget and build PageView after the data was loaded, but the error still occurs.

Did you check FlutterFlow's Documentation for this topic?
No
4
1 reply