title: listview.builder doesnt works with scrollDirection: Axis.horizontal
body: <p>This is my HomePage.dart in which I am trying to display list of products horizontally but when I set                  scrollDirection: Axis.horizontal the entire screen turns white, I have used hero widget for some details page and thats why I have created widget buidItem.
  please help I am badly stuck at this I also tried signleChildScrollView but that didnt work too.</p>
  <pre class="lang-dart prettyprint-override"><code>import 'package:EcommerceApp/animations/fadeAnimations.dart';
  import 'package:EcommerceApp/screens/info_page.dart';
  import 'package:flutter/material.dart';
  
  class MyHomePage extends StatelessWidget {
    final List&lt;Map&lt;String, String&gt;&gt; dataList = [
      {&quot;imageLink&quot;: &quot;images/1.jpg&quot;, &quot;tag&quot;: &quot;one&quot;, &quot;name&quot;: &quot;product1&quot;},
      {&quot;imageLink&quot;: &quot;images/2.jpg&quot;, &quot;tag&quot;: &quot;two&quot;, &quot;name&quot;: &quot;product2&quot;},
      {&quot;imageLink&quot;: &quot;images/3.jpg&quot;, &quot;tag&quot;: &quot;three&quot;, &quot;name&quot;: &quot;product3&quot;},
      {&quot;imageLink&quot;: &quot;images/4.jpg&quot;, &quot;tag&quot;: &quot;four&quot;, &quot;name&quot;: &quot;product4&quot;},
      {&quot;imageLink&quot;: &quot;images/bensen.jpg&quot;, &quot;tag&quot;: &quot;five&quot;, &quot;name&quot;: &quot;product5&quot;},
      {&quot;imageLink&quot;: &quot;images/marl.jpg&quot;, &quot;tag&quot;: &quot;six&quot;, &quot;name&quot;: &quot;product6&quot;},
      {&quot;imageLink&quot;: &quot;images/fs.jpg&quot;, &quot;tag&quot;: &quot;seven&quot;, &quot;name&quot;: &quot;product7&quot;},
      {&quot;imageLink&quot;: &quot;images/marl.jpg&quot;, &quot;tag&quot;: &quot;eight&quot;, &quot;name&quot;: &quot;product8&quot;},
    ];
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.transparent,
          elevation: 0,
          title: Text(
            &quot;Home Page&quot;,
            style: TextStyle(color: Colors.black, fontSize: 25),
          ),
        ),
        body: Column(
          children: [
            Expanded(
              child: ListView.builder(
                   scrollDirection: Axis.horizontal, // this scrollDirection is throwing error but when I remove this It works just fine
                  padding: EdgeInsets.symmetric(horizontal: 10),
                  itemCount: dataList.length,
                  itemBuilder: (context, index) {
                    return buidItem(
                        image: dataList[index]['imageLink'],
                        tag: dataList[index]['tag'],
                        name: dataList[index]['name'],
                        context: context);
                  }),
            ),
          ],
        ),
        // This trailing comma makes auto-formatting nicer for build methods.
      );
    }
  
    Widget buidItem(
        {String image = &quot;images/&quot;,
        @required String tag,
        @required String name,
        @required BuildContext context}) {
      return Material(
          child: Hero(
              tag: tag,
              child: GestureDetector(
                onTap: () {
                  Navigator.push(
                      context,
                      MaterialPageRoute(
                          builder: (context) =&gt; InfoPage(
                                image: image,
                                tag: tag,
                                name: name,
                              )));
                },
                child: Container(
                  height: 100,
                  width: double.infinity,
                  decoration: BoxDecoration(
                    image: DecorationImage(
                        fit: BoxFit.cover, image: AssetImage(image)),
                  ),
                ),
              )));
    }
  }
  </code></pre>