加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

dart – flterter示例中的Flow Layout

发布时间:2020-12-14 14:52:12 所属栏目:百科 来源:网络整理
导读:我想在flutter中实现流程布局我在sdk中找到了一个名为FLOW的类但是无法找到关于如何使用它的示例代码 这是我想要实现的布局 解决方法 使用 Wrap 而不是Flow. Flow用于更复杂的自定义布局. Wrap是用于实现屏幕截图中布局的内容. new Wrap( spacing: 8.0,// ga
我想在flutter中实现流程布局我在sdk中找到了一个名为FLOW的类但是无法找到关于如何使用它的示例代码

这是我想要实现的布局

enter image description here

解决方法

使用 Wrap而不是Flow.

Flow用于更复杂的自定义布局. Wrap是用于实现屏幕截图中布局的内容.

new Wrap(
  spacing: 8.0,// gap between adjacent chips
  runSpacing: 4.0,// gap between lines
  children: <Widget>[
      new Chip(
        avatar: new CircleAvatar(backgroundColor: Colors.blue.shade900,child: new Text('AH')),label: new Text('Hamilton'),),new Chip(
        avatar: new CircleAvatar(backgroundColor: Colors.blue.shade900,child: new Text('ML')),label: new Text('Lafayette'),child: new Text('HM')),label: new Text('Mulligan'),child: new Text('JL')),label: new Text('Laurens'),],)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读