onDidRemovePage property

DidRemovePageCallback? onDidRemovePage
final

Called when the Route associated with the given Page has been removed from the Navigator.

This can happen when the route is removed or completed through Navigator.pop, Navigator.pushReplacement, or its friends.

This callback is responsible for removing the given page from the list of pages.

The Navigator widget should be rebuilt with a pages list that does not contain the given page Page. The next time the pages list is updated, if the given Page is still present, it will be interpreted as a new page to display.

Implementation

final DidRemovePageCallback? onDidRemovePage;