ListView.separated(
//排列方向 垂直和水平
scrollDirection: Axis.vertical,
//分割线构建器
separatorBuilder: (BuildContext context, int index) {
return Divider(height: 2, color: Colors.green);
},
itemBuilder: (BuildContext context, int position) {
return ListTile();
},
itemCount: myList.length);
网友评论