【发布时间】:2023-01-02 13:21:46
【问题描述】:
我有一个带有可选项目的自定义列表视图。我正在尝试选择自动显示在我选择的项目之上的所有项目。例如:假设列表视图中有 10 个项目,我选择了第 5 个,那么它应该选择第 5 个以上的所有可用项目。即(1,2,3,4)。
return CheckboxListTile(
activeColor: const Color.fromARGB(
255, 243, 243, 243),
checkColor: UIGuide.light_Purple,
selectedTileColor:
UIGuide.light_Purple,
value: value.selecteCategorys
.contains(value.feeList[index]
.installmentName ??
'--'),
onChanged: (bool? selected) async {
value.onFeeSelected(
selected!,
value.feeList[index]
.installmentName,
index,
value.feeList[index].netDue);
},
title: Text(
value.feeList[index].netDue ==
null
? '--'
: value.feeList[index].netDue
.toString(),
textAlign: TextAlign.end,
),
secondary: Text(
value.feeList[index]
.installmentName ??
'--',
),
);
【问题讨论】: