optionGroups property
The groups of available options.
Do not modify this list from outside of this class. Instead, create a SelectionOptions from a stream. This list may be replaced by the data provider, so consider this list reference to be ephemeral, with the SelectionOptions object's property as the source of truth.
Implementation
@override
List<OptionGroup<T>> get optionGroups => _optionGroups;
Implementation
@override
set optionGroups(List<OptionGroup<T>> value) {
var oldValue = _optionGroups;
if (oldValue != value) {
_optionGroups = value;
//_flattenedList = _optionGroups != null
// ? _optionGroups.expand((i) => i).toList()
// : <T>[];
_flattenedList = _optionGroups.expand((i) => i).toList();
_controller.add(_optionGroups);
}
}