方式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);
}),
)