Hello, in this video, I am going to show you how to implement a flat button. So a flat button is basically a button that don't have any elevation in terms of tech, I have that for free the look very, you know, flat. And that is a modern standard, you know, according to the material design standards that Google has set, a very popular now. And there's a lot of stuff you can do in life and pretty simple philosophy can do. So you just add it as you would any normal child in any sort of widget that doesn't matter. So child or if you think no lift of children, no, I mean, like an array of children who had in the normal way.
And this requires one thing, actually, there's two things that he absolutely requires. So he requires a callback. So on pressed, so when it's being pressed, we'll know essentially call some method What we can do, we can add in that this is a button. Click, obviously the type of method and what it does. You can also have an inline method that's totally up to you. In here, we need to do a button click like so let's save it.
Let's see what we get. No, no button at the moment. So we need to provide some extra properties. So what other properties can we provide? We can provide essentially a chart. And in here you can put a row you can put a lot of stuff for the button can be quite complex.
I've got them for a text item. Me Let me save that see what we get added see we have the button there. And when we click to click the twice button, we can provide a lot more property than that looks, frankly not very good. So what we can do is if you left us holy, so on to change the color. So full color colors make this blue, save them. So now the background is blue.
If we want to change the text color, we can just do text color. Let's say that that we have worked in that Okay, that's looking pretty good. But you notice when we Click it. Now you'd have a different sort of, you know, shade to it, we can change that as well. So we can say, highlight color, highlight color, is color dot black. As you can see, we've got something totally different than a whole heap of other color property, they can add, we've gone in disable text color, you can add, you know, also text fields, as well, who's really cool stuff or like to do an accent.
You can add, you know, a bunch of other stuff. Well, you can change the setting the brightness, you can change the geometry in terms of the padding, you can change how he clips, you know, in terms of the content inside of the vehicle, maybe the content inside of is dynamically generated as a result in might be, you know, to the public. Content fit inside of the button itself. Lastly there obviously you can check out all of the boxes like so, but nothing much more to it. If you have any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.