I have this json structure
"abc":{
current_checklist:[
{
....
},
{
"sections":[
...
]
},
{
...
}
]
}
I want to use ListView, where the itemCount is based on sections. How should I write it?
Widget _displayCheckList(ABCData abcData) {
return ListView.builder(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount:
abcData.abc.currentChecklist.???,length, // how to get the "sections" length?
itemBuilder: (context, index) {
return Text("Hello");
},
);
}
}