title: how to create a row of scrollable text boxes or widgets in flutter inside a ListView?
body: <p>1.Please, can someone tell me how to create a row of text boxes that are scrollable to left or right in flutter inside a ListView. I can see that I am trying to define an infinite width inside a finite width ListView. But, can't figure out any workaround for this one.</p>
  
  <p>the below-mentioned code works absolutely fine if simply comment the scrolldirection property in customscrollview(i.e., change the scrolldirection to vertical). But, i am looking for a horizontal scroll.
  I have tried to solve this but no luck.</p>
  
  <p>can someone please help and let me know where i am doing wrong.</p>
  
  <ol start="2">
  <li>Also, how can we create or inflate a layout like we do in Android in the flutter?
  I have included a screenshot of layout i am creating for reference:</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/pL5dF.png" alt="1[enter image description here"></p>
  
  <p>I have posted the code below to reproduce the same error;</p>
  
  <p>Regards,
  Mahi</p>
  
  <pre><code>  import 'package:flutter/material.dart';
    import 'package:flutter/rendering.dart';
     import 'package:flutter/widgets.dart';
         void main(){
         runApp(new AddNewBlock());
         }
  
   class AddNewBlock extends StatefulWidget{
  
  @override
  State&lt;StatefulWidget&gt; createState() {
  return new _AddNewBlockState();
      }
    }
  
     class _AddNewBlockState extends State&lt;AddNewBlock&gt;{
  
  
      @override
     Widget build(BuildContext context) {
     return new MaterialApp(
              title: 'Add New Block',
    debugShowCheckedModeBanner: false,
  
    home: new Scaffold(
  
      body: new ListView(
        shrinkWrap: true,
  
        children: &lt;Widget&gt;[
          new Container(
            margin: const EdgeInsets.only(
              left: 16.0,top: 24.0, bottom: 8.0,
            ),
            child: new Text(
              'Add New Block',
            style: new TextStyle(
              fontSize: 18.0,
              fontWeight: FontWeight.bold,
              color: Colors.teal[300],
      ),
            ),
          ),
          new Container(
            margin: const EdgeInsets.only(left: 16.0, top: 16.0, bottom: 8.0),
            child: new Text ('Block Name'),
          ),
  
          new Container(
            margin: const EdgeInsets.fromLTRB(16.0, 8.0, 0.0, 8.0),
            child: new Text ('Block A1',
            style: new TextStyle(
              fontSize: 16.0,
              fontWeight: FontWeight.bold
            ),),
          ),
          new Divider(color: Colors.grey,),
          new Container(
            margin: const EdgeInsets.only(left: 16.0, top: 8.0,bottom: 8.0),
            child: new Text('NO. OF FLOORS',
            style: new TextStyle(
              fontSize: 12.0,
            ),
            ),
          ),
  
  
  
         new Container(
                      child: new Row(
                        children: &lt;Widget&gt;[
                          new Flexible(
                            child: new CustomScrollView(
                              shrinkWrap: true,
                              scrollDirection: Axis.horizontal,
                              slivers: &lt;Widget&gt;[
                            new SliverPadding(
                            padding: const EdgeInsets.all(20.0),
                            sliver: new SliverList(
                              delegate: new SliverChildListDelegate(
                                &lt;Widget&gt;[
                                  const Text('this'),
                                  const Text('is'),
                                  const Text('scroll'),
                                  const Text('view'),
                                  const Text('inside'),
                                  const Text('list'),
                                  const Text('view'),
                                  const Text('in'),
                                  const Text('horizontal'),
                                  const Text('direction')
                                ],
                              ),
                            ),
                          ),
                        ],
                            ),
                          ),
                        ],
                      ),
                    ),
  
  
  
  
  
        ],
  
      ),
    ),
  
  
    );
     }
  }
  </code></pre>