toggle method

void toggle()

Toggle the current animation

Implementation

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