Hello, in this flutter programming video, I am going to show you the aspect ratio widget. So I've got a image and a text item here displayed within a column child, you could have it displayed However, one puffiness is best to just demonstrate it. We've got this image of Batman, and then we got the text Hello blue below it. I didn't literally just directly below it. If I was doing after ratio, use the new aspect ratio. And he would require basically an aspect ratio, we'll get onto that in a second.
This is add a child so the child will be colon and whatever child we want to put there. And I'm going to literally put this wherever the images, it could be stored in a variable if you want to. And now obviously the comment here. If I was to change this to get the aspect ratio, remember, you have images that could be 16 by nine that's what modern TVs you could have what oh TVs up Usually the four by three ratio not quite square, but more square like, you can have 21 by nine, which is the more cinema or ultra widescreen aspect ratio. So if I do four by three, this is the way you put the upper ratio, you didn't know the actual ratio if it's 16 by nine equals 16 divided by nine, and that will work out the actual ratio. If I save that, as you can see, it's, you know, it's moved around a bit.
And what happened is, we basically said all the children inside of it have an aspect ratio of four by three, which is more square like hence this, you know, white space here. That's the reason this hello world text starts below or quite a bit below the image because usually after ratio, we've said the image or the contents, go all the way down to here and all the way up to here, even though they don't, but that's just a way for us to Specify if we know when images are gonna be four by three, or 16 by nine or 21 by nine to ensure positional or other items around this particular widget is, you know, looking very good on our user interface. That really, there's not not much more to it to the aspect ratio. I demonstrated that with an image. You could have another child that had children inside of it doesn't really matter what it is.
It could be a row, it could be another column. It could be text, the top child doesn't matter. But what's important is this aspect here. So that's 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.