After two hours, I decided to finally ask all of you. Within 5 minutes I found that wrapping it with Flexible eliminates the error.
Here is the code:
Widget build(BuildContext context) {
return Flexible(
child: ListView(
padding: const EdgeInsets.symmetric(),
children: tasks,
),
);
}
Md. Yeasin Sheikh also suggested just a minute later: wrapping it with Expanded and that works too. Not sure what I missed in the documentation about ListView.