比你优秀的人比你还努力,感谢提醒和砥砺!
flutter列表组件
body: new ListView(
children: [
new ListTile(
leading: new Icon(Icons.perm_contact_cal_rounded),
title:new Text('heihei')
),new ListTile(
leading: new Icon(Icons.perm_camera_mic),
title:new Text('haha')
),new ListTile(
leading: new Icon(Icons.perm_identity),
title:new Text('xixi')
),
new Image.network('https://img-blog.csdnimg.cn/dc76c5925c1e4bf9b37ed98575aee89d.png'),
new Image.network('https://img-blog.csdnimg.cn/be49464b249d467d90bb80ac58e2c065.png'),
new Image.network('https://img-blog.csdnimg.cn/dc76c5925c1e4bf9b37ed98575aee89d.png'),
new Image.network('https://img-blog.csdnimg.cn/be49464b249d467d90bb80ac58e2c065.png'),
],
),
横向列表的使用
class MyList extends StatelessWidget{
@override
Widget build(BuildContext context){
return ListView(
scrollDirection: Axis.horizontal,
children: [
new Container(
width: 300.0,
height: 300.0,
color:Colors.lightBlue,
),
new Container(
width: 100.0,
height: 300.0,
color:Colors.red,
),
new Container(
width: 100.0,
height: 300.0,
color:Colors.purpleAccent,
),
new Container(
height: 300.0,
width: 100.0,
color:Colors.lightBlue,
),
],
);
}
}