Reputation: 95
I can't find the problem and I don't know what to do. Please can you help.
Widget _buildTodoItem(String title) {
return Padding(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 0.0),
child: GestureDetector(
onTap: () =>
setState(() {
_color = Colors.black;
}),
child: Card(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(title),
color: _color,
),
),
),
);
}
Upvotes: 0
Views: 915
Reputation: 907
Replace Your Card widget with this:
Card(
child: Container(
padding: const EdgeInsets.all(8.0),
child: Text(title),
color: _color,
),
),
Upvotes: 1