Flow Layout in flutter example

前端 未结 2 1119
日久生厌
日久生厌 2021-02-13 14:40

i want to implement flow layout in flutter i found a class called FLOW in sdk but unable to find sample code on how to use it

here is the layout i am trying to achieve

2条回答
  •  一个人的身影
    2021-02-13 15:33

    In Flutter wrap is batter widget for creating layout like your screenshot

    Wrap : It can adjust its children according to the space available to it on the Screen. The default arrangement is horizontal (like a row) but you can make it vertical (like a column).

    chip : This widget use for create TAG or chips

    new Wrap(
      spacing: 5.0, // horizontal gap between chips
      runSpacing: 2.0, // gap between row
      children: [
          new Chip(
            label: new Text('One'),
          ),
          new Chip(
            label: new Text('Two'),
          ),
          new Chip(
           label: new Text('Three'),
          ),
          new Chip(
            label: new Text('Four'),
          ),
      ],
    )
    

提交回复
热议问题