美文网首页
flutter Wrap Chip

flutter Wrap Chip

作者: 基本密码宋 | 来源:发表于2020-03-18 17:10 被阅读0次
微信截图_20200318170941.png
  Widget getOtherSubmitWidget() {
    return Wrap(
      spacing: ScreenUtil.getInstance().setWidth(32), // 主轴(水平)方向间距
      runSpacing: ScreenUtil.getInstance().setWidth(16), // 纵轴(垂直)方向间距
      alignment: WrapAlignment.start, //沿主轴方向居中
      children: <Widget>[
        new Chip(

          label: new Text('Hamilton'),
        ),
        new Chip(
          label: new Text('Lafayette'),
        ),
        new Chip(
          avatar: new CircleAvatar(backgroundColor: Colors.blue, child: Text('H')),
          label: new Text('Mulligan'),
        ),
        new Chip(
          avatar: new CircleAvatar(backgroundColor: Colors.blue, child: Text('J')),
          label: new Text('Laurens'),
        ),
      ],
    );
  }

相关文章

网友评论

      本文标题:flutter Wrap Chip

      本文链接:https://www.haomeiwen.com/subject/bnjcyhtx.html