ListView.Builder | ListView.Separated | Flutter പഠിക്കാം മലയാളത്തിൽ |

Опубликовано: 14 Июнь 2023
на канале: FlutterFly
652
30

ListView: The ListView widget displays a scrolling list of children. It is suitable for small lists that can fit within the available screen space. This widget is useful when you have a fixed or small number of items.

ListView.builder: The ListView.builder widget is used when you have a large or dynamically changing list of items. It creates items lazily as they become visible on the screen, which improves performance and memory usage.

ListView.separated: The ListView.separated widget is similar to ListView.builder, but it adds a separator widget between each item in the list. You can customize the separator's appearance and behavior.

ListView.custom: The ListView.custom widget is the most flexible option. It allows you to provide a custom SliverChildDelegate to define the list's children. This widget is useful when you need fine-grained control over the list's behavior or when working with complex list layouts.

ListView.horizontal: The ListView.horizontal widget is used to create a horizontally scrolling list. It is suitable for displaying items in a horizontal arrangement instead of the default vertical layout.

ListView.shrinkWrap: The ListView.shrinkWrap widget is used when the ListView needs to be embedded within another scrolling widget, such as a Column or ListView. It adjusts its height based on the size of its children, allowing it to shrink or expand as needed.