toggle method

void toggle()

Opens the suggestions box if closed and vice-versa.

Implementation

void toggle() {
  if (isOpen) {
    close();
  } else {
    open();
  }
}