toggle method

void toggle()

在展开与折叠之间切换。

Implementation

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