During execution, is there a way for the developer to see the state of the Navigator stack?
I am using Visual Studio Code and Android Studio.
For instance:
Navigator RouteA RouteB RouteD etc.
MaterialPageRoute<T> class Null safety. A modal route that replaces the entire screen with a platform-adaptive transition. For Android, the entrance transition for the page zooms in and fades in while the exiting page zooms out and fades out. The exit transition is similar, but in reverse.
Following steps:
Set a breakpoint where you want to inspect, which must be inside a builder
function which has context
, and run in Debug mode
Run your app to the break point
Open "Evaluate expression"
Evaluate Navigator.of(context)
Inspect the _history
In my example, you can see there are 2 routes in the history, with all relevant debuggable data.
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With