choiceSelectorAll property

  1. @override
Widget choiceSelectorAll
override

Returns the choices selector widget

Implementation

@override
Widget get choiceSelectorAll {
  return Checkbox(
    activeColor: choiceActiveStyle?.color ?? defaultActiveChoiceStyle.color,
    value: selection!.length == choices!.length
        ? true
        : selection!.length == 0
            ? false
            : null,
    tristate: true,
    onChanged: (value) {
      if (value == true) {
        selection!.merge(choices!.items!);
      } else {
        selection!.clear();
      }
    },
  );
}