We defined our screens.
Now let's start implementing the navigation component in our app.
The first step is to create the nav controller.
The nav controller is the central API for the navigation component.
It's stateful and keeps track of the backstack of Composables that make up the screens in your app and
the state of each screen.
You can create a nav controller by using the Remember Nav controller method in your composable.
So here inside the Setcontent I'll create nav controller equals.
To remember nav controller, you should create the nav controller in the place in your composable hierarchy,
where all composables that need to reference it have access to it.
This follows the principle of state hoisting that allows you to use nav controller and the state it
provides via current Backstack entry as state method to be used as the source of truth for updating
Composables outside of your screens.
So the main purpose of nav controller is for navigating between Composables.
The Remember Nav controller method is a function that it is called to create and remember the nav host
controller instance across Recompositions.
And by using this function, you can efficiently handle navigation in your Jetpack Compose app, ensuring
that the navigation controller is correctly managed across Recompositions.