I am using Navigator.pushNamed(context, '/RegisterScreen'); to Navigate to Register Screen but it not run smoothly , It seems that the first screen under the second one for about half a second on navigation
I am using Navigator.pushNamed(context, '/RegisterScreen'); to Navigate to Register Screen but it not run smoothly , It seems that the first screen under the second one for about half a second on navigation
push or pushNamed doesn't close current screen if you want to new screen get replace(not on) your current screen you need to use pushReplacement or pushReplacementNamed method
so try below code and check methods in flutter documents to get the whole idea about navigation:
Navigator.pushReplacementNamed(context, '/RegisterScreen');