toggle method

void toggle()

Convenience method for toggling the current isExpanded status.

Calling this method may cause the Expansible to rebuild, so it may not be called from a build method.

Calling this method will notify registered listeners of this controller that the expansion state has changed.

See also:

Implementation

void toggle() => isExpanded ? collapse() : expand();