For this tutorial pre-booked an application we want to talk bot a rotting and rotting.
It basically means navigating and between different screens.
So we all we had just all was all homescreen.
And now we want to look at how we can maybe get a bot screen or different screens.
So this application we just look at it once saw a home screen called it routing it.
Now I've got an area here and can click on it and then we get to screen to and from here we can go one
further.
Screen 3 know all we can go back and so we can here go back also.
So this is our three screens and we talk about routing.
Now on this project you.
So firstly I've made two more dot file it's called screen to dot and screen Sridhar.
And these are the two screens and can look at these and these are just stateful widgets.
So they are built up just like our main art or some person but we don't have our main method.
In all Mamette is just our entry point and we needed just one.
And therefore we don't have a TIA.
But the other part are exactly the same sort of stateful widget.
And we've got a state here and then we return the material and with this effort and we've we built it
all out like before with a bomb title.
Nothing special here and in screens 3 is the same.
So yeah exactly how we did it before.
And don't forget you imports foil on the Turia design.
It's up here.
So on and on Main dot we firstly need to import screen to screen screen.
We can do it by simple import and then the important part is after this update we imported it we declare
our routes as and map in all our main after home say Rochlitz.
And a little bit routes should be a string and a widget but are still string is key and widget but so
our value and then we say splash screen to this variable doesn't necessarily mean this way but this
is like a convention that you declare your thoughts slash and then the name and want to save it.
But context context and it should give us on screen to which we can call because we import it off screen
to datea which is this class right here.
It's the same way we did four screen three get a law boot context and then we call the screen three
then we do the following.
We've got all our button here.
This is our main page Hawting page and this is all I can up here where we can click on and we say if
we want to navigate to a specific site we say a push named and then give it a context or voice need
the context and then the name we'd éclat up here and it navigator.
Act Slyke like it's a stack of screens.
So if you push name you put a screen on top of the other.
And this is how we navigate.
So with push you push one screen on top and make it visible.
First screen that's what you do.
Never get a push name give it's a context and the verb to appear in screen 2 gets called which is our
widget right here.
And then we've got this screen to watch it right here.
And in the screen too we basically just have to do the following.
We've got to.
I can see the hand to go back one.
We simply say never get a pop context was PABX we remove the first the highest screen so the screen
which is on top we can remove by saying you get a pop context.
That's what happens when I click here.
So the first screen gets put down.
And we are on the screen with one which is on the first screen so we can go back on back here and here.
The navigator works the same.
If we want to go to the next screen by saying never get a push name context and screen three.
So these are the two important methods you need to know navigate a pop context to go back one and to
never get a push name context to go to a specific route.
And your thoughts.
You need to define as we have seen him.
Aha.
Right.
CSO if you need more rods then you just simply declare it here.
And we talked about how you can define these widgets and you just go on your lip and say new and click
on Dot fire on him and just type it in and then when it's Esti for all is he less you can make your
new digit screen.