We will cover briefly about

  1. Storing navigation routes

  2. Implement navigatorObservers

Storing navigation routes

It's quite clear, we need a data structure for storing routes.

Thought process: When we navigate between different links in a browser, the last link is usually the first to be traced back (on click of the back button).

Implementing Stacks in Dart

In doing my research I found


Implement Navigator Observers

We have the list queue implemented from the above step.

Next, we need to place this list queue in our flutter web, in such a way that

  • whenever a new route is pushed,

  • it should also be added to our NavStack class