toggle method

void toggle()

Convenience method for toggling the current isShowing status.

This method should typically not be called while the widget tree is being rebuilt.

Implementation

void toggle() => isShowing ? hide() : show();