I have this code:
child: Column(
children: [
Text(i.description),
i.colors.map<Widget>(
(colours) => CheckboxListTile(
title: Text(colors),
value: i[colors],
onChanged: (colors){
setState(() {
i[colors] = colors;
});
},
).toList()
],
)
I want to show checkbuttons for each color present in each object, but it throws this error:
type 'List < Widget>' is not a subtype of type 'Widget'
How can I fix it?