I tried these lines of code,
`Navigator.pushReplacement(context,
MaterialPageRoute(builder: (context) => object),`
But this shows the problems like- I have to close the replaced page twice then close the application. (Like, If I replace the login page with dashboard then to close application, I have to press back button and again other times back button)