In my code I use nested listview.builder with shrinkWrap: true and NeverScrollableScrollPhysics().
The problem is that the items are not loaded lazily because they are nested in a SingleChildScrollView().
However I need a way to have two (or more) listview.builder among themselves with only the full screen to be scrollable.
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
buildListView(list1),
buildListView(list2),
],
));
}
Widget buildListView(List list) {
return ListView.builder(
itemCount: list.length,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
itemBuilder: (context, index) => ListTile(title: list[index].toString()),
);
}