Flutter Navigation routes not run smoothly

Viewed 1070

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

1 Answers

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');
Related