在行内添加listview.builder给出异常

时间:2018-11-09 12:48:39

标签: flutter-layout

当我尝试在行中添加 listview.builder 时,会出现异常

我的代码:

var Odoo = require('odoo-xmlrpc');
var odoo = new Odoo({
    url:'https://mydomain.odoo.com',
    db:'mydb',
    username: 'mydatabase',
    password: 'password'});
    
    
odoo.connect(function (err) {
    if (err) { return console.log(err); }
    console.log('Connected to Odoo server.');
     var params = [[{
   
    'product_id': 2,
    'product_uom_id':2,
    'location_id':9,
    'picking_type_id':2,
    'location_dest_id': 13,
   
      }]];
odoo.execute_kw('stock.move','create', params, function(err, value) {
    if (err) { return console.log(err); }
    console.log(value);});
});

例外情况:

return new Scaffold(
  appBar: new AppBar(
    // Here we take the value from the MyHomePage object that was created by
    // the App.build method, and use it to set our appbar title.
    title: new Text(widget.title),
  ),
  body: Row(children: <Widget>[
      ListView.builder(
        shrinkWrap: true,

        scrollDirection: Axis.vertical,
        itemCount: 3,
        itemBuilder: (BuildContext context, int index) {
          return Text('data');
        },
      )
     // This trailing comma makes auto-formatting nicer for build methods.
  ],)
);

1 个答案:

答案 0 :(得分:0)

环绕展开,然后添加到list.builder>物理中: const NeverScrollableScrollPhysics(),