如果通过
您的意思是,当行上没有剩余空间时,芯片应包装,然后应使用
Wrap小部件(documentation)代替
Row。它会自动在多个水平或垂直运行中显示其子级:
new Wrap( spacing: 8.0, // gap between adjacent chips runSpacing: 4.0, // gap between lines direction: Axis.horizontal, // main axis (rows or columns) children: <Widget>[ new Chip( label: new Text('Chips11') ),new Chip( label: new Text('Chips12') ),new Chip( label: new Text('Chips13') ),new Chip( label: new Text('Chips14') ),new Chip( label: new Text('Chips15') ),new Chip( label: new Text('Chips16') ) ],)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)