title: Flutter How to show list by for loop
body: <p>I have created a simple list to show it by for loop.</p>
  <pre><code>List categories = [
    {
      {
        'CatID': '0',
        'CatName': 'All'
      },
      {
        'CatID': '1',
        'CatName': 'Computer Hardware'
      },
      {
        'CatID': '2',
        'CatName': 'Computer Software'
      },
    }
  ];
  </code></pre>
  <p>then i define a widget like this</p>
  <pre><code>List&lt;Widget&gt; CatWidget = List&lt;Widget&gt;(); 
  </code></pre>
  <p>Then i use it like this</p>
  <pre><code>for (int i = 0; i &lt; 8; i++) {
    CatWidget.add(
      Container(
        child: Text(categories[i]['CatName']),
      ),
    );
  }
  </code></pre>
  <p>Its showing error <code>Class '_CompactLinkedHashSet&lt;Map&lt;String, String&gt;&gt;' has no instance method '[]'.</code></p>