title: Flutter dart error (The relevant error-causing widget was ...)
body: <p>Im getting multiple errors because of my widget's size or datas ( i guess).
  I tried to wrote this part all over again but it didn't work.
  Is it because of widgets size or something else ?</p>
  <pre><code> @override
   Widget build(BuildContext context) {
     var questionsOf = widget.setType(InputPage.topicN);
  
     CollectionReference contestantsRef =
         FirebaseFirestore.instance.collection('contestants');
  
     return Scaffold(
       backgroundColor: Colors.blue,
       appBar: AppBar(
         centerTitle: true,
       ),
       body: SafeArea(
           child: Column(
         children: &lt;Widget&gt;[
           Flexible(
               child: Container(
             height: 100,
             child: iconCreate(),
           )),
           Container(
             child: StreamBuilder&lt;QuerySnapshot&gt;(
               stream: contestantsRef.snapshots(),
               builder: (BuildContext context, AsyncSnapshot asyncSnapshot) {
                 List&lt;DocumentSnapshot&gt; listOfDocumentSnap =
                     asyncSnapshot.data.docs;
  
                 return ListView.builder(
                   itemBuilder: (context, index) {
                     return Text('${listOfDocumentSnap[index].data()}');
                   },
                   itemCount: listOfDocumentSnap.length,
                 );
               },
             ),
           ),
           SizedBox(
             height: 100,
           ),
           Flexible(
             flex: 4,
             child: Container(
               height: 200,
               margin: EdgeInsets.all(20),
               decoration:
                   BoxDecoration(border: Border.all(color: Colors.black)),
               child: Center(
                 child: StreamBuilder(
                   stream: questionsOf.snapshots(),
                   builder: (BuildContext context, AsyncSnapshot asyncsnapshot) {
                     String question1 =
                         asyncsnapshot.data.data()['q$questionIndexa']
                             ['q$questionIndexa' + 'Sent'];
                     return Text('$question1');
                   },
                 ),
               ),
             ),
           ),
           Flexible(
               flex: 3,
               child: Container(
                 child: Column(
                   children: [
                     buildAnswerBox(questionsOf, 1, questionIndexa),
                     SizedBox(
                       height: 10,
                     ),
                     buildAnswerBox(questionsOf, 2, questionIndexa),
                     SizedBox(
                       height: 10,
                     ),
                     buildAnswerBox(questionsOf, 3, questionIndexa),
                     SizedBox(
                       height: 10,
                     ),
                     buildAnswerBox(questionsOf, 4, questionIndexa),
                   ],
                 ),
               ))
         ],
       )),
     );
   }
  </code></pre>
  <p>This is the Error part:</p>
  <pre><code>════════ Exception caught by rendering library ═════════════════════════════════
  RenderBox was not laid out: RenderCustomPaint#60178 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  'package:flutter/src/rendering/box.dart':
  package:flutter/…/rendering/box.dart:1
  Failed assertion: line 1929 pos 12: 'hasSize'
  
  The relevant error-causing widget was
  ListView
  lib\guess_page.dart:74
  
  
  ════════ Exception caught by rendering library ═════════════════════════════════
  RenderBox was not laid out: RenderRepaintBoundary#c207a relayoutBoundary=up3 NEEDS-PAINT
  'package:flutter/src/rendering/box.dart':
  package:flutter/…/rendering/box.dart:1
  Failed assertion: line 1929 pos 12: 'hasSize'
  
  The relevant error-causing widget was
  Column
  lib\guess_page.dart:60
  ═══════════════════════════════
  </code></pre>
  <p>After all i get is a flat blue screen like this</p>
  <p><a href="https://i.stack.imgur.com/QmOyQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QmOyQ.png" alt="enter image description here" /></a></p>
  <p>The things i tried.
  Firstly i thought it's because of stream builder and i tried to change stream builder and listview part but it didn't work.
  Than i wrap widgets with expanded and flexible (given flex) but it didn'T work too.</p>