toggle method

void toggle()

Opens the suggestions box if closed and vice-versa

Implementation

void toggle() {
  if (suggestionsBox?.isOpened ?? false) {
    close();
  } else {
    open();
  }
}