selectAction static method

void selectAction(
  1. List<PopoverActionModel> filters,
  2. String selectedLabel
)

Implementation

static void selectAction(List<PopoverActionModel> filters, String selectedLabel) {
  for (var element in filters) {
    element.isSelected = false;
  }
  int index = filters.indexWhere((element) => element.value == selectedLabel);
  filters[index].isSelected = true;
}