Hey Nowa builders!
We just released a new ListView and GridView widget, and they’re coming as a replacement for using Group in some cases.
But, when to use Groups and when to use ListView and GridView?
In previous versions, Groups
were used for everything! From displaying data inside the app to placing widgets in a horizontal or vertical structure.
But, there were many problems using Groups
when you needed to display a list of data, such as:
- You need to add a Scroll wrapper to make them scrollable
- It can be laggy when connected to a large list since it will try to render all widgets at once
- Adjusting its layout is difficult and limited
- Can’t add a separator between the items
- Problems and difficulties when dealing with the Placeholder
But, with the new ListView and GridView, you can:
- Use Builder mode to render only the necessary items and render more when the user scrolls, making it efficient in handling large data
- Adjust the layout in exact detail before connecting it to a list
- Add a separator, as a fixed space or widget
- Adjust the scrolling to be vertical or horizontal easily
Read more on how to use the ListView and GridView widgets in our official docs.
In summary:
- If you want to connect a list to display data, then use
ListView
orGridView
withBuilder
mode - In case you want to just place a group of widgets vertically or horizontally, you can either use
Groups
or also use the normal modes inListView
andGridView
.- If you need it to be scrollable, then I would advise using the normal mode in
GridView
andListView
- If you just want to place widgets horizontally or vertically without scrolling, then use the older way of
Groups
.
- If you need it to be scrollable, then I would advise using the normal mode in
If you have any questions, please feel free to ask here!
Let’s build something big