美文网首页flutter
ListView 传入数组时获取index方法

ListView 传入数组时获取index方法

作者: toobai | 来源:发表于2021-08-03 09:38 被阅读0次

    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(),

    相关文章

      网友评论

        本文标题:ListView 传入数组时获取index方法

        本文链接:https://www.haomeiwen.com/subject/fwdjvltx.html