How to replace initial Route in MaterialApp without animation?

Posted by Andre Scott | Updated on

Want to replace initial Route in MaterialApp without animation? However, having a single Scaffold and updating the body when the user taps a drawer item is a totally reasonable approach. You might consider a FadeTransition to change from one body to another.

If you like using Navigator but don’t want the default slide animation, you can customize (or disable) the animation by extending MaterialPageRoute. Here’s an example of that:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers