concept list in category flutter

This is an excerpt from Manning's book Flutter in Action.
“Everything is a widget” is a potentially misleading statement that you’ll see everywhere on the internet, including in the official documentation. This doesn’t mean there aren’t other objects in Flutter. Rather, it means that every piece of your app is a widget. Styles, animations, lists, text, buttons, and even pages are widgets. For example, there isn’t an object called “App” that defines the root of your application. The root of your application can technically be any widget. To be sure, there are other objects in the Flutter SDK (such as elements), which we’ll discuss later.
Suppose you’re building a shopping cart app. The app is pretty standard: it’ll list products, which you can add to a cart via Add and Remove buttons. Well, the list, the products, the buttons, the images, and everything else are widgets. Figure 1.3 shows how some of these widgets would be coded. Other than widgets, the only classes you’re likely to write are your own logic-specific classes, which aren’t related to Flutter.
List<int> nums = [1,2,3,4,5]; int i = 0; int sum = 0; while (i < nums.length) { sum += nums[i]; i+=1; } print(sum); List<int> nums = [1,2,3,4,5]; print(addNumbers(nums));
Earlier in the book, I made it a point to tell you that everything in Flutter is Dart code. And what’s more, Dart has features that make it specifically useful as a language to create a UI. Here, I want to show you a nifty example of how helpful it is that everything is in Dart code. Rather than pass a list to the children property of the table, we can use functions, constructors, and classes that return widgets.
According to the docs, a list view is a “scrollable list of widgets arranged linearly.” In human English, it’s a scrollable row or column, depending on what axis you specify. The power of the list view is how flexible it is. It has a couple of different constructors that let you make choices based on the content of the list. If you have a static, small number of items to display, you can create a list view with the default constructor, and it will be created with code very similar to a row or column. This is the most performant option, but it may not be ideal if you have tens or hundreds of items to put in the list, or an unknown number of items.