I can also create lists by this code that I can with ListView.builder so what differentiate both?
for(Item in List) View(Item);
I am new to development and trying to understand this.
Is it good if I use above approach?
I can also create lists by this code that I can with ListView.builder so what differentiate both?
for(Item in List) View(Item);
I am new to development and trying to understand this.
Is it good if I use above approach?
When items are limited(not more but few) you can use ListView
widget, but for many items (like as thousands of items, also created on demand) - You should use ListView.builder
.
The difference between of them is: When you use ListView
, all the items are rendered on screen. But when you use ListView.builder
, items are rendered on demand. Only the items are visible on the screen and few of above & bottom are rendered.
For more: