Component - ListView basics
The ListView widget in Flutter shows a scrollable list of items vertically. It is useful when you want to display many similar widgets one after another, like a list of messages or contacts.
The ListView widget in Flutter shows a scrollable list of items vertically. It is useful when you want to display many similar widgets one after another, like a list of messages or contacts.
Scaffold
├─ AppBar
└─ ListView
├─ Text ("Item 1")
├─ Text ("Item 2")
├─ Text ("Item 3")
├─ Text ("Item 4")
└─ Text ("Item 5")ListView in Flutter?children property to accept a list of widgets.children: [ ... ] with a list of Text widgets.ListView(
children: [
Text('Apple'),
Text('Banana'),
Text('Cherry')
],
)ListView(
children: Text('Hello'),
)children property requires a list of widgets, e.g., [Text('Hello')].Pass the test and this pattern moves unknown