PopMode enum Null safety
Enables the user to customize the intended pop behavior
Goes to either the previous history entry or the previous page entry
e.g. if the user navigates to these pages
when popping on History mode, it will emulate a browser back button.
so the new history stack will be:
when popping on Page mode, it will only remove the last part of the route so the new history stack will be:
another pop will change the history stack to: