getAllSelectables method
Implementation
List<Selectable> getAllSelectables(Selectable selectable) {
final List<Selectable> selections = <Selectable>[];
if (selectable is State<SelectionContainer>) {
SelectionContainer s = (selectable as State<SelectionContainer>).widget;
if (s.delegate is MultiSelectableSelectionContainerDelegate) {
MultiSelectableSelectionContainerDelegate d =
s.delegate as MultiSelectableSelectionContainerDelegate;
for (final Selectable nestedSelectable in d.selectables) {
selections.addAll(getAllSelectables(nestedSelectable));
}
} else {
selections.add(selectable);
}
} else {
selections.add(selectable);
}
return selections;
}