Day 16 Of Flutter - Routes

Day 16 Of Flutter - Routes

Table of contents

On day 16, I implemented email verification for my notes app and linked my views using routes so users could navigate through my login, registration and email verification screens.

Routes

Routes are the various views in an app that a user can navigate. With the aid of routes, a user can move from one page of an app to the next and back.

Types Of Routes

There are two types of routes. A route can either be named or anonymous.

Named Routes: named routes allow you to define a name for each page in your app and then use that name to navigate to the screen. So I can have a route named '/registeration/' for my registration screen and then call Navigator.pushNamed(context, '/registeration/) to navigate to that screen from the login page. Named routes help keep code clean and organized.

Anonymous Routes: Anonymous routes are created on the fly and do not have a predefined name. Anonymous routes are created using an instance of the MaterialPageRoute class and passing the widget you want to navigate to.

That's all for day 16, my next post will be on Tuesday as I will be going out of town for the weekend. See ya!