title: Flutter dart add list to children
body: <p>I am new on dart, I just want to add a list of my data using map (<strong>store.state.availablePage.map</strong>) to the children of ListView, but I already have some item on the ListView.</p>
  
  <p>Here the sample code I want :</p>
  
  <pre><code>class MgDrawer extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      return StoreBuilder&lt;AppState&gt;(
        builder: (context, store) {
          return Drawer(
            child: ListView(
              padding: EdgeInsets.zero,
              children: &lt;Widget&gt;[
                Text("Title"),
                store.state.availablePage.map((value) {
                  return ListTile(
                    title: Text("Title"),
                    onTap: () {},
                  );
                }).toList(),
              ],
            ),
          );
        },
      );
    }
  }
  </code></pre>
  
  <p>Please help me how I can achieve that?</p>
  
  <p>Update: the code above is not compiled.</p>
  
  <p><strong>Updates Dart Lang version > 2.2.2, can be achieve using below code</strong> :</p>
  
  <pre><code>class MgDrawer extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
      return StoreBuilder&lt;AppState&gt;(
          builder: (context, store) {
          return Drawer(
              child: ListView(
              padding: EdgeInsets.zero,
              children: &lt;Widget&gt;[
                  Text("Title"),
                  ...store.state.availablePage.map((value) {
                  return ListTile(
                      title: Text("Title"),
                      onTap: () {},
                  );
                  }).toList(),
              ],
              ),
          );
          },
      );
      }
  }
  </code></pre>