deselect method

  1. @override
bool deselect(
  1. T value
)
override

When given a un-selected entity, this will check the treeoptions for children and deselect them.

Implementation

@override
bool deselect(T value) {
  bool wasNewSelection = super.deselect(value);
  if (wasNewSelection) {
    _treeOptions
        .allChildrenOf(value)
        .forEach((subItem) => super.deselect(subItem));
  }
  return wasNewSelection;
}