Flutter Error: The body might complete normally, causing ‘null’ to be returned, but the return type is a potentially non-nullable type

You forgot to use return in your itemBuilder.

Use

ListView.builder(
  itemBuilder: (context, index) {
    return TaskTile(...); // <-- 'return' was missing 
  },
)
Share