updateSections method Null safety

void updateSections(
  1. UniqueKey key
)

Implementation

void updateSections(UniqueKey key) {
  openSections.contains(key) ? openSections.remove(key) : openSections.add(key);

  if (openSections.length > maxOpenSections) openSections.removeRange(0, openSections.length - maxOpenSections);
}