This is weird but below code is not working for me. I get a back arrow on the home screen when using below code.

First line below is for dismissing the dialog box. second one is to go to home screen.

```dart
 Navigator.of(context, rootNavigator: true).pop();
 Navigator.of(context).pushReplacementNamed(HomeScreen.id);

```

This is first time I am facing this kind of situation with `pushReplacementNamed`. what's going on here ?