toggle method

Future<void> toggle()

Convenience method for toggling the current shown status.

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

Implementation

Future<void> toggle() async => shown ? hide() : show();