title: Dart : ambiguous_set_or_map_literal_both
body: <p>Hi I'm new to flutter mobile app development and following the course on udemy.
  I got stuck at one point where the instructor can create the variable with maps and literal variable both whereas in my editor I'm getting this error which says</p>
  
  <pre><code>This literal contains both 'Map' and 'Iterable' spreads, which makes it impossible to determine whether the literal is a map or a set. Try removing or changing some of the elements so that all of the elements are consistent
  </code></pre>
  
  <p>I have checked the code many times with one with the instructor and also checked the Dart official docs for this but couldn't able to resolve it. Please if anyone can help me.
  Thanks.</p>
  
  <pre><code>final _questions = const [
      {
        'questionText':
            'Who is the current president of The United Stated of America?',
        'answers': [
          {'text': 'Donald Trump', 'score': 10},
          {'text': 'Ram Nath Kovind', 'score': -10},
          {'text': 'Pedro Sánchez', 'score': -10},
        ],
      },
      {
        'questionText': 'Which of these is the currency used in Japan?',
        'answers': {'text': 'Ringgit', 'score': -10},
        {'text': 'Yuan', 'score': -10},
        {'text': 'Yen', 'score': 10},
      },
      {
        'questionText': 'Which of these is the capital of Spain?',
        'answers': {'text': 'Madrid', 'score': 10},
        {'text': 'Washington DC', 'score': -10},
        {'text': 'Moscow', 'score': -10},
      },
      {
        'questionText': 'Which one is the language of Israel?',
        'answers': {'text': 'Persian', 'score': -10},
        {'text': 'Hebrew', 'score': 10},
        {'text': 'Turkish', 'score': -10},
      },
      {
        'questionText': 'Who among these was the Missile Man of India?',
        'answers': {'text': 'Pranab Mukherjee', 'score': -10},
        {'text': 'Sir APJ Abdul Kalam', 'score': 10},
        {'text': 'Bhagat Singh', 'score': -10}, 
      },
    ];
  </code></pre>
  
  <p>This is the variable that contains some set of questions.
  <a href="https://i.stack.imgur.com/NOV5d.png" rel="nofollow noreferrer">Screenshot of code</a></p>
  
  <p>Check the screenshot for more info in error.</p>