setSelectedOptions method
select the options MultiSelectController is used to select the options.
Implementation
void setSelectedOptions(List<ValueItem<T>> options) {
if (options.any((element) => value._disabledOptions.contains(element))) {
throw Exception('Cannot select disabled options');
}
if (options.any((element) => !value._options.contains(element))) {
throw Exception('Cannot select options that are not in the options list');
}
value._selectedOptions.clear();
value._selectedOptions.addAll(options);
notifyListeners();
}