isChanged method
Check if there are any changes in selection.
Comparing using length and two way containsAll check.
Implementation
bool isChanged() {
if (_originalSelected.length != _constrainedSelected().length) return true;
if (!_originalSelected.containsAll(_constrainedSelected())) return true;
if (!_constrainedSelected().toSet().containsAll(_originalSelected))
return true;
return false;
}