buildChoicesList method

  1. @override
List<Widget> buildChoicesList(
  1. BuildContext context,
  2. List<DialogChoice<T>> selectedChoices,
  3. Function setState
)
override

Implementation

@override
List<Widget> buildChoicesList(BuildContext context,
    List<DialogChoice<T>> selectedChoices, Function setState) {
  return choices
      .map<SimpleDialogOption>((e) => SimpleDialogOption(
          onPressed: () {
            confirmDialog(context, [e]);
          },
          child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [e.icon, buildChoicesDetail(context, e)]
                  .where((element) => element != null)
                  .toList())))
      .toList();
}