How to detect back navigation to update the calling page?

Actions & Logic

So here's the scenario.

List Page - Showing list of items

Details Page - On click of an item from the List Page, this page is visible and it has an edit button

Edit Page - After editing the form there's a save button. Ideally after updating the item, it should go back to Details Page.

This is ideal flow:

List > Details > Edit > Details

But on the edit page, after the update document is called (on Firestore) I am using Navigate back. Now, I need to detect this back navigation on Details Page to update it with new Data (refresh the data from Firestore).

I am avoiding using custom code as I believe this should be in FlutterFlow and I am missing it since I am new to the platform.

In core Flutter the way to achieve this is:

Navigator.push(

context,

MaterialPageRoute(

builder: (context) => NextPage(),

),

).then((_){

// Here you will get callback after coming back from NextPage()

// Do your code here

});

What have you tried so far?

Tried Navigate Back but it does not get detected from the calling page.

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