'How to preserve then action for route pop when replacing routes?

So question is a little strange, but I'll try my best to make it clear.

So we have 3 pages:

  1. page with list of customers
  2. customer info page
  3. customer edit page

The flow is you tap on customer in list -> router.push(CustomerInfo).then(_refreshList()) and on Customer Info page we have Edit Customer button which goes to CustomerEdit page like -> router.replace(CustomerEdit)

how can I specify that after poping the CustomerEdit screen and returning to CustomersList Page refresh function goes off?



Solution 1:[1]

Executing a function after popping works like so:

Navigator.push().then(functiontThatShouldBeExecuted);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TheUltimateOptimist