let say I have 2 pages, PageA and PageB.
if a user tap a button in PageA then it will move to PageB using the code below
Navigator.of(context).pushNamed("pageB");
so as a result, there is back button in the top left app bar in PageB
my question is .....
how do I know if a page is pushed or not? I want to do something only if there is a back button in the appbar in a page