closeSection method

void closeSection(
  1. int index
)

Implementation

void closeSection(int index) {
  final newOpenSections = List<int>.from(_openSections.value);
  newOpenSections.remove(index);
  _openSections.value = newOpenSections;
  notifyListeners();
}