toggle method

void toggle()

Toggle the value of the signal

Example:

final signal = BoolSignal(false);
signal.toggle();
print(signal.value); // true

Implementation

void toggle() {
  value = !value;
}