HomePage Screenshot

Today, I’ll give some examples for setting your homepage in dynamic way in Flutter app. You known, Flutter has a MaterialApp widget class to start your app. This class has a property which name is “home” and you can use this property with a creating a new class. But, If you want to change your home in some reasons on booting your app, how can do this?

In the basic, you can do this by using a condition on booting but if you want to check the given user to authenticated and you want to decide which page should be home for this user you need to use asynchrony. Why? Because, which method you using for auth system, it should have a asynchrony function for first checking.

I’ll give a example for authentication in this post.