BEEPIXL
 · CEO at BEEPIXL

Issue with Updating Parent Component in ListView After Modifying AppState on Sub-Page

Actions & Logic

Hello FlutterFlow Community,

I am currently working on a project where I am using FFAppState to manage data between pages. The scenario is as follows:

  • On the Main Page, I have a ListView that displays items. Each item contains a unique hashID and catId. List view is infinite scroll view

  • When the Main Page loads, I store the data in FFAppState.

  • Upon navigating to a Sub-Page, I allow the user to update the catId for a specific hashID.

  • After the update, I store the modified list in FFAppState.

However, the issue is that when I navigate back to the Main Page, the ListView doesn't automatically refresh to reflect the updated catId for that specific hashID, even though FFAppState has been updated correctly.

What have you tried so far?

Steps I Followed:

  1. On the Main Page, I store a list in FFAppState containing hashID and catId.

  2. On the Sub-Page, I update the catId for the selected hashID.

  3. After updating the FFAppState on the Sub-Page, I navigate back to the Main Page.

  4. The ListView on the Main Page doesn't reflect the changes made on the Sub-Page.

    What I Tried:

    • I ensured the ListView on the Main Page is correctly bound to FFAppState.

    • I checked if FFAppState was properly updated on the Sub-Page.

    • I tried using a Set App State action after the update, but the issue persists.

    Expected Behavior:

    When the catId is updated on the Sub-Page, the ListView on the Main Page should automatically reflect the new value based on the updated FFAppState.

    Request:

    Has anyone faced a similar issue? How can I force the ListView on the Main Page to refresh automatically after updating the FFAppState on the Sub-Page? Any insights or solutions would be greatly appreciated!

    Thank you in advance for your help!


    Note: I don't want to do pull to refresh or call the api again

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