allSelectedFor method
Tristate value for a select-all control given itemCount.
Returns true when all selected, false when none, and null when
some but not all are selected.
Implementation
bool? allSelectedFor(int itemCount) {
if (itemCount <= 0 || _selected.isEmpty) {
return false;
}
if (_selected.length >= itemCount) {
return true;
}
return null;
}