Question: I want to redirect from **<https://www.example.net>** to **<https://www.example.net/dd>**
but I cannot find any solution to do this.

Answer: 
When you push a new page, the previous page is still rendered and therefore `dispose()` is not called.

* [How to get current route path in Flutter?](https://stackoverflow.com/questions/46483949/how-to-get-current-route-path-in-flutter)

Also sometimes it can happen that the widget is not rendered anymore but `dispose` was not yet called, which can lead to weird error messages. So adding such a check is probably a good idea as well if you use `dispose`. 

* <https://docs.flutter.io/flutter/widgets/State/mounted.html>

Change

```
//It will display items

```

to

```
if(myIsCurrentRoute && mounted) {
  //It will display items
}

```
I was experiencing the same problem and it turns out that the stream seems to keep listening for events for a while before canceling, but if you debug you will see that after dispose is called it will stop listening at some point. 
Therefore, [Gunter's](https://stackoverflow.com/a/54901093/7606929) solution works fine, since you can prevent your callback function from being called if mount is false, which means your page is no longer there.