Flutter Navigation: Fetching the previous Route
I have been doing some flutter development lately out of interests and I came upon the flutter navigator. I am using the default style way, so no routing lib is used(just Navigator.push/pop), however I would like to be able to fetch the previous route of the current rout(in other words fetching the route that initialised and called the current one.
At the moment I have a final field in each Route where I can recognise the caller, however this is a very bad way of doing it in addition of being unpractical especially when I have composed classes.
Any idea of how this can be achieved? Thanks