openSection method

void openSection(
  1. int index
)

Implementation

void openSection(int index) {
  if (limitExpandedToOne) {
    _openSections.value = [index];
  } else {
    final newOpenSections = List<int>.from(_openSections.value);
    if (!newOpenSections.contains(index)) {
      newOpenSections.add(index);
    }
    _openSections.value = newOpenSections;
  }
  notifyListeners();
}