title: i am getting Exception caught by widgets library
body: <pre class="lang-dart prettyprint-override"><code>import 'package:app1/answer.dart';
  import 'package:flutter/material.dart';
  import 'question.dart';
  import 'answer.dart';
  void main() =&gt; runApp(MyApp());
  class MyApp extends StatefulWidget {
   @override
   MyAppState createState() =&gt; MyAppState();
  }
  class MyAppState extends State&lt;MyApp&gt; {
   var questionindex = 0;
   void answerquestion() {
     if (questionindex == 1) questionindex = -1;
     setState(() {
       questionindex++;
     });
     print(questionindex);
     print(&quot;answer chosen&quot;);
   }
  
   final List&lt;Map&lt;String, Object&gt;&gt; question = [
     {
       'questionText': 'what is your fav color?',
       'answers': ['black', 'green', 'blue', 'yellow']
     },
     {
       'questionText': 'whats your fav animal?',
       'answers': ['rabbit', 'dog', 'cat', 'monkey']
     },
   ];
  
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
       theme: ThemeData(
           elevatedButtonTheme: ElevatedButtonThemeData(
               style: ButtonStyle(
         backgroundColor: MaterialStateProperty.all(Colors.red),
       ))),
       home: Scaffold(
         appBar: AppBar(
           title: Text(&quot;quiz app&quot;),
         ),
         body: Container(
           child: Column(
             children: &lt;Widget&gt;[
               Question(question[questionindex]['questionText'] as String),
               ...(question[questionindex]['answers'] as List&lt;String&gt;).map(
                 (answer1) {
                   return Answer(answerquestion, answer1);
                 },
               ).toList(),
             ],
           ),
         ),
       ),
     );
   }
  }
  </code></pre>
  <p>these are the exception that i am getting</p>
  <pre><code>═════ Exception caught by rendering library ═════════════════════════════════
  A RenderFlex overflowed by 399452 pixels on the bottom.
  The relevant error-causing widget was
  Column
  
  Exception caught by widgets library ═══════════════════════════════════
  setState() or markNeedsBuild() called during build.
  The relevant error-causing widget was
  Answer
  </code></pre>