Closed mschlegelaware closed 3 weeks ago
In the didPop function inside the ScreenObserver is an issue.
didPop
ScreenObserver
the code:
@override void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) { final name = route.settings.name; if (name != null) { screenStreamController.add(name); } }
From the documentation from didPop:
The Navigator popped route. The route immediately below that one, and thus the newly active route, is previousRoute. Copied from NavigatorObserver.
Therefore the code should be:
@override void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) { final name = previousRoute.settings.name; if (name != null) { screenStreamController.add(name); } }
previousRoute is the new route, and therefore that is the name which should be tracked, not route.
previousRoute
route
Hi @mschlegelaware thank you for your report, we start looking into this.
In the
didPop
function inside theScreenObserver
is an issue.the code:
From the documentation from
didPop
:Therefore the code should be:
previousRoute
is the new route, and therefore that is the name which should be tracked, notroute
.