如何在列表视图的一侧添加按钮

这里

在此处输入图片说明

我想在列表视图的右侧有一个按钮 我尝试将它排成一行,但它会导致错误

我如何在这里做这个新手

Row(
..
  children:[
    ListView(
    items...
    ),
    FlatButton(...)

  ]
)

像这样的东西?

迪帕克·洛莫德
Row(
  crossAxisAlignment: CrossAxisAlignment.start,
  mainAxisSize:MainAxisSize.min,
  children:[
    Expanded(
    child:ListView(
      scrollDirection: Axis.horizontal,
    children:[
      Text('12345 '),
      Text('12345 '),
      Text('12345 '),
      Text('12345 '),
      Text('12345 '),
    ]
    ),),
    FlatButton(child:Text('button')),
  ]
),

只需将您的列表展开并按行对齐即可正确对齐。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章