toggle method

void toggle()

Toggle the isOpen state of this MenuController.

Implementation

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