Hello, in this video I am going to show you how to implement a Cupertino tab bar basically allows you to create a tab bar in the format of iOS. And so far, you don't need a navigation bar. So what you have is called from a previous video and was going to add a tab bar right here. This child tab. Oh, sorry, no, it's good to know. Both we're doing the Cupertino one.
We'll do the items, items. And for this report in a row, bottom navigation bar item, bracket and this is just a list of items that we can put in here. So we just wanted to bottom navigation bar right? This property that we need is the icon and the toggle. You can mess around with the active icon and the background color I recommend doing either next to the icon icons. Alright, that's my icon, icon.
Here you are icons cars got one for home Here's to a home one point all this will be simple text can be no text on a home screen so we can add as many as you want. And I'm going to change this to my boot up menu. Before I do that, it can't stop Like the one that looks like a supervisor, and I'm just gonna call this one. So let's save that and see what we get. Okay, so we got this Cupertino toolbar, click on him, nothing that is happening to my mini to handle all of that ourselves. So what we can do is we can draw a current index current index is what is currently selected.
If I say two by default, it's on index two numbers 012, the computer stopped, and we can go to the on top method, which is pretty cool. And on the on top, you have an interoperable index. And now, we can continue so for click on this On zeros, click on this one printer one, click on this one, a printer two, but still not changing. And to do that, we need to get rid of this from this previous video, either integer variable, I'm gonna call it date, keep it simple, set it to zero, so by default will be the first item on the chain the current index to this state variable. And in here, you want to do set state equals state equals that way this will refresh it so now if I click it, as you can see, it is no changing and obviously for you can change the background color and the active icon as well.
So what would you want to do with this, you would naturally have some sort of view here, and depending on which item you select, you will show certain cons our homepage using social networking sites, like Facebook, for example, Twitter, you could show a feed on the home to click on menu, you could, you know, show you some menu, and then I can issue your personal account options. But let's test that's one way to do is hook it up with some content that is displayed basically, depending on what the index is. If you have any questions and you need some assistance, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.