RenderIndexedSemantics object was given an infinite size during layout

Viewed 319

i get this error when i use listviewbuilder for my app here is my code

ListView.builder(
        padding: const EdgeInsets.all(0),
        itemCount: 1,
        itemBuilder: (BuildContext context, int index) {
          return Scaffold(
            body: SafeArea( //and the rest of codes... 
1 Answers

The setup is wrong.

It should be like this,

SafeArea(
  child: Scaffold(
    body:ListView.builder();
  ),
Related