--

Hi,
ListView.builder factory will optimize widgets instantiation. It won't call itemBuilder 5000 times, avoiding out of memory issues and unnecessary process. It's like Android RecyclerView, jetpack compose LazyColumn, and iOS equivalents UITableView and SwiftUi List.

Your method should returns a const Container. Like this, Flutter engine will detect objects equality, avoiding calling the underneath RenderObject to update UI.

If you want to understand Flutter rendering, one big question to answer is: why flutter force us to create const classes, whereas every render objects are mutable ?

--

--

David Gonzalez
David Gonzalez

Written by David Gonzalez

Hi, I’m David, a french mobile applications developer. As a freelance, I work on Android and iOS applications since 2010. I also work on Flutter now !

No responses yet