toggle method Null safety

Rx<bool> toggle()

Toggles the bool value between false and true. A shortcut for flag.value = !flag.value; FIXME: why return this? fluent interface is not not really a dart thing since we have '..' operator

Implementation

// ignore: avoid_returning_this
Rx<bool> toggle() {
  subject.add(_value = !_value);
  return this;
}