我有12个项目的清单。我有一个这样的LisView:
child: ListView.builder(
itemCount: (snapshot.data.length / 2).round(),
itemBuilder: (context, index) {
return Row(
children: [
Checkbox(
value: false,
onChanged: (bool value) {
_swipeCheckboxState(value, index);
}),
Text(snapshot.data[index]['name'].toString()),
//Text(snapshot.data[index].name),
],
);
},
),
现在,我想将元素的视图分为两列。如何在Flutter中做到这一点?
答案 0 :(得分:0)
只需创建一个内部有两个ListView的行。
在第二个ListView中更新itemCount和索引,如下所示:
The property 'UserId' cannot be configured as a navigation property.
The property must be a valid entity type and the property should have a non-abstract getter and setter.
For collection properties the type must implement ICollection<T> where T is a valid entity type.