[web] Always send the route name even if it's null - #41996
Conversation
|
Is clearing really the right choice? If I am on page x and I press a button to bring up some kind of a pop-up route (which I believe is implemented as nameless route) it still feels like I am on page x. |
|
(Unrelated to this PR:) It also looks like the way these notifications work don't work with nested navigators. |
@goderbauer that's a good point. But the problem is how can we distinguish between pop-up routes and real routes that happen to have no name?
If that's the case, I'd love to fix it :) Could you elaborate please? |
|
If you have a root navigator and a nested navigator B. If you navigate to a different page within B, the URL bar will only show the route within B. It doesn't show the route within the root navigator anymore to get to the page that contained the nested navigator. |
Description
When a nameless route is pushed, we should be sending a platform message with route name as
nullin order for the engine to be able clear the browser url.Related Issues
Fixes #41375
Tests
I added tests in following files:
test/widgets/route_notification_messages_test.dartChecklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?