toggle method

void toggle()

Toggles the current value.

Implementation

void toggle() => value = !value;