how can i iterate bello list and show it in my structure?
List courses = [
{'course 1':{'p':['course 0'],'need':[],'v':3}},
{'course 2':{'p':[],'need':['course 1','course 0'],'v':2}},
{'course 3':{'p':['course 1'],'need':[],'v':2}},
];
@override
Widget build(BuildContext context) {
return Container(
child: Column(children: [
...courses.map((e) => Container(
color: Colors.amber,
width: 200,
height: 40,
margin: EdgeInsets.all(4),
child: Column(
children: [
Text(e[0],style: TextStyle(color: Colors.white),),
Text(e['p'],style: TextStyle(color: Colors.grey),),
Text(e['need'],style: TextStyle(color: Colors.grey),),
Text(e['v'],style: TextStyle(color: Colors.grey),),
],
),)),
],),);
}
i want my result be like this:
course 1 : p: course 0 / need: null
course 2 : p: null / need: course 1 + course 0
. . .
thanks .