flatOptionGroup method

List<OptionGroup<T>> flatOptionGroup()

Flatten all the OptionGroups of the tree into one long list.

Implementation

List<OptionGroup<T>> flatOptionGroup() {
  List<OptionGroup<T>> result = [];

  getHierarchyMap()
      .values
      .forEach((List<OptionGroup<T>> options) => result.addAll(options));

  return result;
}