shouldExpand method
Whether to expand a given option group.
When expandAll is true, always expand an option group, otherwise renderingOptions can decide whether to expand an option group.
Implementation
bool shouldExpand(OptionGroup group, int index) {
if (renderingOptions == null) return expandAll;
return expandAll || renderingOptions!.shouldExpand(group, index);
}