toggle method

void toggle()

Toggles the bool value between false and true. A shortcut for flag.value = !flag.value;

Implementation

void toggle() {
  if (value != null) {
    call(!value!);
    // return this;
  }
}