ListView and ListTile

3 minutes
Share the link to this page
Copied
  Completed
A single fixed-height row that typically contains some text as well as a leading or trailing icon.

Transcript

Hello, in this video, we are going to take a look at the list view. And this time, we'll be creating a list view, which is essentially something that you display on screen. As you scroll through a list of items or whatever you want in there, you'll have a child you could have you know column in there, which has multiple children, you can have images that's totally up to you, customizable as you want. And a list title will be each one of the little sections in the ListView. not compulsory to use a mystery this tall, but I'll show you why you most likely want to. So you want to replace whatever your body has with less view.

And then inside of here, we're gonna go to children. There are a bunch of other properties and recommend as an extra test that you experiment with it or provide a link to the official documentation, but we're only interested in the children for this view. Then in here, I want to add no text shows. I'm just gonna click Hello, comma, and I'm done. duplicating a bunch of times. And let's see what we get.

So that's what we get. I didn't see not very fancy, you can scroll through it. If you technically have enough of these. Add enough just so I can demonstrate that. As you can see, I can scroll through, but again, it doesn't look very elegant. So instead of having text directly in here, we're going to remove that you can have any sort of widget, but the one we want, if you guessed it list, now in here with our title, and the title of the text.

And here we're gonna I'm gonna put Hello, and I'm going to save that. It looks different. Let me show you what it looks like if I add multiple. Wow, okay, that's looking a bit bad. You can scroll if there's enough on there. Let me know take it one step further.

I want to get rid of this. And instead of doing this I'm also gonna add a subtitle. And the subtitle is a step further, you can experiment with the on top on long press, which are events and accommodate a separate video, but when are you not interested in that here, only do the leading and the leading or allow us to basically let's go back into lead in will allow us to put any widget so I'm not an icon icons.me so instead of that, I'm gonna put you know, the music former The King of Atlantis typically well that's that's good. I didn't see that look pretty darn cool. So let me put something at the store and we got a title. Let me show you what it looks like we have multiple of them we can actually scroll.

There we go and we can see that is looking a lot better. with just the simple addition of enclosing the text inside with a list title. We didn't have to format in a very nice way there are lots of other stuff as well experiment with trading which is a widget no after and that's really all there is to know the garden mixed views and list oils. If you have any questions though, feel free to drop me a message. And as usual, I look forward to seeing you in the next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.