title: in Flutter, problem arise when I add ListView in my scaffold
body: <p>I am new to flutter, trying to add a listview to one of my route that when clicked, take me to a new route specific to each of the list card.</p>
  <p>here's my route code:</p>
  <pre><code>class SecondRoute extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: Colors.transparent,
        appBar: AppBar(
          title: Text('What you are in the mood for?'),
          backgroundColor: Colors.lightGreen[400],
          centerTitle: true,
        ),
        body: Column(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
          Text('Select a genre:',
              textAlign: TextAlign.center,
              style: TextStyle(
                  fontSize: 40,
                  color: Colors.black,
                  fontWeight: FontWeight.bold)),
  
  
          //if I add ListView(...) here, I get errors
  
  
        ]),
      );
    }
  }
  </code></pre>
  <p>The problem I receive is:</p>
  <pre><code>════════ Exception caught by rendering library ═════════════════════════════════════════════════════
  Tried to paint a RenderObject reentrantly.
  The relevant error-causing widget was: 
    Scaffold file:///Users/User/AndroidStudioProjects/choose_a_game_for_me/lib/main.dart:102:12
  ════════════════════════════════════════════════════════════════════════════════════════════════════
  
  ════════ Exception caught by rendering library ═════════════════════════════════════════════════════
  The following assertion was thrown during paint():
  Tried to paint a RenderObject reentrantly.
  
  The following RenderObject was already being painted when it was painted again: RenderFlex#aafa2 relayoutBoundary=up5
  ...  needs compositing
  ...  parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
  ...  constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=603.4)
  ...  size: MISSING
  ...  direction: vertical
  ...  mainAxisAlignment: spaceEvenly
  ...  mainAxisSize: max
  ...  crossAxisAlignment: center
  ...  verticalDirection: down
  Since this typically indicates an infinite recursion, it is disallowed.
  The relevant error-causing widget was: 
    Scaffold file:///Users/Users/AndroidStudioProjects/choose_a_game_for_me/lib/main.dart:102:12
  When the exception was thrown, this was the stack: 
  #0      RenderObject._paintWithContext.&lt;anonymous closure&gt; (package:flutter/src/rendering/object.dart:2208:9)
  #1      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2221:6)
  #2      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:184:13)
  #3      RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2515:15)
  #4      RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:404:5)
  ...
  The following RenderObject was being processed when the exception was fired: RenderCustomMultiChildLayoutBox#8a3f0 relayoutBoundary=up4
  ...  needs compositing
  ...  parentData: &lt;none&gt; (can use size)
  ...  constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=683.4)
  ...  size: Size(411.4, 683.4)
  RenderObject: RenderCustomMultiChildLayoutBox#8a3f0 relayoutBoundary=up4
    needs compositing
    parentData: &lt;none&gt; (can use size)
    constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=683.4)
    size: Size(411.4, 683.4)
  ...  child 1: RenderFlex#aafa2 relayoutBoundary=up5
  ...    needs compositing
  ...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
  ...    constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=603.4)
  ...    size: MISSING
  ...    direction: vertical
  ...    mainAxisAlignment: spaceEvenly
  ...    mainAxisSize: max
  ...    crossAxisAlignment: center
  ...    verticalDirection: down
  ...    child 1: RenderParagraph#e94b7 relayoutBoundary=up6 NEEDS-PAINT
  ...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
  ...      constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=Infinity)
  ...      size: Size(343.0, 47.0)
  ...      textAlign: center
  ...      textDirection: ltr
  ...      softWrap: wrapping at box width
  ...      overflow: clip
  ...      locale: en_US
  ...      maxLines: unlimited
  ...      text: TextSpan
  ...        debugLabel: ((englishLike body1 2014).merge(blackMountainView bodyText2)).merge(unknown)
  ...        inherit: false
  ...        color: Color(0xff000000)
  ...        family: Roboto
  ...        size: 40.0
  ...        weight: 700
  ...        baseline: alphabetic
  ...        decoration: TextDecoration.none
  ...        &quot;Select a genre:&quot;
  ...    child 2: RenderRepaintBoundary#02cc2 relayoutBoundary=up6 NEEDS-PAINT
  ...      needs compositing
  ...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
  ...      constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=Infinity)
  ...      size: MISSING
  ...      usefulness ratio: no metrics collected yet (never painted)
  ...      child: RenderCustomPaint#cd675 relayoutBoundary=up7 NEEDS-PAINT
  ...        needs compositing
  ...        parentData: &lt;none&gt; (can use size)
  ...        constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=Infinity)
  ...        size: MISSING
  ...        child: RenderRepaintBoundary#1d1e0 relayoutBoundary=up8 NEEDS-PAINT
  ...          needs compositing
  ...          parentData: &lt;none&gt; (can use size)
  ...          constraints: BoxConstraints(0.0&lt;=w&lt;=411.4, 0.0&lt;=h&lt;=Infinity)
  ...          size: MISSING
  ...          usefulness ratio: no metrics collected yet (never painted)
  ...  child 2: RenderConstrainedBox#4a2e7 relayoutBoundary=up5 NEEDS-PAINT
  ...    needs compositing
  ...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.appBar (can use size)
  ...    constraints: BoxConstraints(w=411.4, 0.0&lt;=h&lt;=683.4)
  ...    size: Size(411.4, 80.0)
  ...    additionalConstraints: BoxConstraints(0.0&lt;=w&lt;=Infinity, 0.0&lt;=h&lt;=80.0)
  ...    child: RenderSemanticsAnnotations#997db relayoutBoundary=up6 NEEDS-PAINT
  ...      needs compositing
  ...      parentData: &lt;none&gt; (can use size)
  ...      constraints: BoxConstraints(w=411.4, 0.0&lt;=h&lt;=80.0)
  ...      semantic boundary
  ...      size: Size(411.4, 80.0)
  ...      child: RenderAnnotatedRegion&lt;SystemUiOverlayStyle&gt;#e6930 relayoutBoundary=up7 NEEDS-PAINT
  ...        needs compositing
  ...        parentData: &lt;none&gt; (can use size)
  ...        constraints: BoxConstraints(w=411.4, 0.0&lt;=h&lt;=80.0)
  ...        size: Size(411.4, 80.0)
  ...        child: RenderPhysicalModel#35a1a relayoutBoundary=up8 NEEDS-PAINT
  ...          needs compositing
  ...          parentData: &lt;none&gt; (can use size)
  ...          constraints: BoxConstraints(w=411.4, 0.0&lt;=h&lt;=80.0)
  ...          size: Size(411.4, 80.0)
  ...          elevation: 4.0
  ...          color: Color(0xff9ccc65)
  ...          shadowColor: Color(0xff9ccc65)
  ...          shape: BoxShape.rectangle
  ...          borderRadius: BorderRadius.zero
  ...  child 3: RenderStack#16a71 NEEDS-LAYOUT NEEDS-PAINT
  ...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.floatingActionButton
  ...    constraints: MISSING
  ...    size: MISSING
  ...    alignment: centerRight
  ...    textDirection: ltr
  ...    fit: loose
  ...    overflow: clip
  ...    child 1: RenderTransform#68acc NEEDS-LAYOUT NEEDS-PAINT
  ...      parentData: not positioned; offset=Offset(0.0, 0.0)
  ...      constraints: MISSING
  ...      size: MISSING
  ...      transform matrix: [0] 0.0,0.0,0.0,0.0
  [1] 0.0,0.0,0.0,0.0
  [2] 0.0,0.0,1.0,0.0
  [3] 0.0,0.0,0.0,1.0
  ...      origin: null
  ...      alignment: center
  ...      textDirection: ltr
  ...      transformHitTests: true
  ...      child: RenderTransform#9de5f NEEDS-LAYOUT NEEDS-PAINT
  ...        parentData: &lt;none&gt;
  ...        constraints: MISSING
  ...        size: MISSING
  ...        transform matrix: [0] 0.7,0.7,0.0,0.0
  [1] -0.7,0.7,0.0,0.0
  [2] 0.0,0.0,1.0,0.0
  [3] 0.0,0.0,0.0,1.0
  ...        origin: null
  ...        alignment: center
  ...        textDirection: ltr
  ...        transformHitTests: true
  ════════════════════════════════════════════════════════════════════════════════════════════════════
  
  </code></pre>
  <p>I tried making ListView its own class and then added that to my SecondRoute's body, but same error shows up.</p>
  <p>line 102 is the Scaffold in class SecondRoute.</p>
  <p>Thanks for your help</p>