title: Horizontally scrollable cards with Snap effect in flutter
body: <p>I want to create a list of cards scrolling horizontally with snap to fit effect when swiped either from left or right.</p>
  
  <p>Each card has some spacing between them and fit to screen similar to below image</p>
  
  <p><a href="https://i.stack.imgur.com/DdPZU.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/DdPZU.gif" alt="enter image description here"></a></p>
  
  <p>Apart from that these horizontally scrollable list elements should be contained inside a vertically scrollable list.</p>
  
  <p>I all I am able to achieve is only displaying a list of horizontal scrolling  cards after following example in flutter docs.</p>
  
  <pre><code>class SnapCarousel extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      final title = 'Horizontal List';
  
      return MaterialApp(
        title: title,
        home: Scaffold(
          appBar: AppBar(
            title: Text(title),
          ),
          body: Container(
            margin: EdgeInsets.symmetric(vertical: 20.0),
            height: 200.0,
            child: ListView(
              scrollDirection: Axis.horizontal,
              children: &lt;Widget&gt;[
                Container(
                  width: 160.0,
                  color: Colors.red,
                ),
                Container(
                  width: 160.0,
                  color: Colors.blue,
                ),
                Container(
                  width: 160.0,
                  color: Colors.green,
                ),
                Container(
                  width: 160.0,
                  color: Colors.yellow,
                ),
                Container(
                  width: 160.0,
                  color: Colors.orange,
                ),
              ],
            ),
          ),
        ),
      );
    }
  }
  </code></pre>