Bottom navigation
Now that we have our PageComponent working, it's time to add functionality to the bottom navigation. For this, the first thing that we will do is to create a function that will hide and show the necessary elements so that the App Bar and the bottom navigation represent the view in which we are. The function will show the elements of one or the other view according to a parameter that we will have to pass on the call.
The function we created first puts all the elements of the bottom navigation in the deselected state, making the gray state of each one visible and hiding all the elements of the App Bar from all the views.
After analyzing the parameter that we passed to the function with a switch structure, and according to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access