Passing data or callback when navigating back to previous page

Actions & Logic

I am aware how to pass data from one page to the next when using the Navigate To action, however is it possible to pass data back when Navigate Back is called?

A potential use case would be:

  • Page 1 has a list view that queries your database to show a list items

  • Click on Item A in the list, and you Navigate To Page 2

  • From Page 2, you delete the Item A, which takes you back to Page 1

Currently, when I return to Page 1, the list view still contains the deleted item (Item A in the scenario above) when I return back to Page 1. I would like to be able to trigger the Refresh Database Request action upon returning to Page 1, but I cannot figure out how to do this.

I would imagine some sort of callback or call return value would allow me to achieve this functionality, but I have not been able to find any such option. Am I missing something or is there perhaps another way of achieving this functionality?

What have you tried so far?
  • Read the documentation on Navigate To, Navigate Back, and Passing Data (which specifies passing data in one direction, but not in reverse)

  • Tried using Navigate To to return back to previous page on user deletion of list item, but there isn't a way to simulate the animation so that it still looks like the normal back behavior

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