美文网首页
7 Column和ListView混合使用

7 Column和ListView混合使用

作者: Jean_Lina | 来源:发表于2021-12-31 10:38 被阅读0次

方式1: ListView设置shrinkWrap设置true

Expanded(
          child: ListView.builder(
              itemCount: choiceList.length,
              itemBuilder: (cxt, index) {
                return _buildListTitleWidget1(
                    choiceList[index], choiceList[index], index, context);
              }),
        );

方式2: ListView包括Expand

Expanded(
          child: ListView.builder(
              itemCount: choiceList.length,
              itemBuilder: (cxt, index) {
                return _buildListTitleWidget1(
                    choiceList[index], choiceList[index], index, context);
              }),
        )

相关文章

网友评论

      本文标题:7 Column和ListView混合使用

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