buildChoicesList method Null safety
- BuildContext context,
- List<
DialogChoice< selectedChoices,T> > - Function setState
override
Implementation
@override
// ignore: avoid_renaming_method_parameters
List<Widget> buildChoicesList(BuildContext context,
List<DialogChoice<T>> selectedChoices, Function setState) {
return choices
.map<InkWell>((e) => InkWell(
onTap: () => onTap(e, selectedChoices, setState),
child: Padding(
padding: const EdgeInsets.only(left: 10, right: 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: selectedChoices.contains(e),
onChanged: (checked) =>
onTap(e, selectedChoices, setState),
),
e.icon,
buildChoicesDetail(context, e)
].where((element) => element != null).toList().cast()))))
.toList();
}