方式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);
}),
)
网友评论