flutter Wrap Chip

微信截图_20200318170941.png
  Widget getOtherSubmitWidget() {
    return Wrap(
      spacing: ScreenUtil.getInstance().setWidth(32), // 主轴(水平)方向间距
      runSpacing: ScreenUtil.getInstance().setWidth(16), // 纵轴(垂直)方向间距
      alignment: WrapAlignment.start, //沿主轴方向居中
      children: [
        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)