ListView or ListView.builder, which one to use and how to use them?

Well, many times in your Flutter journey, you’ll need to use lists. I

f you need to use a really big and huge list, ListView.builder() is your friend!

Not only will it make your app perform better, it will remarkably shorten the amount of code you’ll need.

Now the regular ListView is also useful, of course. But only for short/small predictable lists.

If you don’t know in advance how many items a list will have, always go with a ListView.builder, as it will only render what is visible in the viewport, making the entire process much more optimal. Thanks Flutter team!

ListView Class official documentation: https://api.flutter.dev/flutter/widgets/ListView-class.html

00:00 - Intro
00:25 - Documentation Definition Explained
01:47 - Learning By Doing
02:30 - ListView Example (+ Spread Operator)
03:03 - ListView Error Example
03:40 - ListView “reverse” Property
04:12 - ListView.builder Explained
07:00 - ListView.builder Usage Example
08:18 - ListView.builder Error Example
08:49 - Like & Subscribe
09:06 - Flutter Mentor Out

#flutter #listview #listviewbuilder

Credits:

OUTRO SONG:
Mitsubachi by Smith The Mister https://smiththemister.bandcamp.com
Smith The Mister https://bit.ly/Smith-The-Mister-YT
Free Download / Stream: http://bit.ly/mitsubachi
Music promoted by Audio Library https://youtu.be/0IgndUb1YQI

#flutter #listview #listviewbuilder

ListView & ListView.builder Explained (+ How To Use It) - Flutter
1.55 GEEK