ListView 传入数组时获取index方法
2021-08-03 本文已影响0人
toobai
ListView(
children:vm.hotQuestionList
.asMap()
.map(
(index, e) {
Widget widget =CellNormal(
title: (index +1).toString() +'、'+ e.solutionTitle,
showSuffixIcon:true,
cellOnTap: () {
vm.hotQuestionClick(e);
});
returnMapEntry(index, widget);
},
)
.values
.toList(),