I have a question about comparing ListView
and SingleChildScrollView
containing a ListBody
. Seemingly, those two results look the same. But I'm curious about whether those two have a difference in function. In my opinion, it could be the part of efficiency or performance, but I'm not sure. Thanks in advance.
SingleChildScrollView + ListBody
final items = List.generate(100, (index) => index).toList();
SingleChildScrollView(
child: ListBody(
children: items.map((e) => Text('$e')).toList(),
)
)
ListView
final items = List.generate(100, (index) => index).toList();
ListView(
children: items.map((e) => Text('$e')).toList(),
)