Jonny Borges
Committed by GitHub

Merge pull request #2519 from Andrflor/fix_toggle

RxBool toggle fixed
@@ -238,7 +238,7 @@ extension RxBoolExt on Rx<bool> { @@ -238,7 +238,7 @@ extension RxBoolExt on Rx<bool> {
238 /// Toggles the bool [value] between false and true. 238 /// Toggles the bool [value] between false and true.
239 /// A shortcut for `flag.value = !flag.value;` 239 /// A shortcut for `flag.value = !flag.value;`
240 void toggle() { 240 void toggle() {
241 - subject.add(!value); 241 + call(!value);
242 // return this; 242 // return this;
243 } 243 }
244 } 244 }
@@ -271,7 +271,7 @@ extension RxnBoolExt on Rx<bool?> { @@ -271,7 +271,7 @@ extension RxnBoolExt on Rx<bool?> {
271 /// A shortcut for `flag.value = !flag.value;` 271 /// A shortcut for `flag.value = !flag.value;`
272 void toggle() { 272 void toggle() {
273 if (value != null) { 273 if (value != null) {
274 - subject.add(!value!); 274 + call(!value!);
275 // return this; 275 // return this;
276 } 276 }
277 } 277 }