RxnBool class
A reactive wrapper for nullable bool values.
- Inheritance
-
- Object
- Listenable
- GetListenable<
bool?> - Rx<
bool?> - RxnBool
- Available extensions
Properties
- firstRebuild ↔ bool
-
Whether this is the first rebuild cycle for this Rx value.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this notifier has been disposed.
no setterinherited
- isFalse → bool
-
Available on Rx<
Returnsbool> , provided by the RxBoolExt extensiontrueif the current value isfalse.no setter - isFalse → bool?
-
Available on Rx<
Returns the inverse of the current value, orbool?> , provided by the RxnBoolExt extensionnullif value isnull.no setter - isTrue → bool
-
Available on Rx<
Returnsbool> , provided by the RxBoolExt extensiontrueif the current value istrue.no setter - isTrue → bool?
-
Available on Rx<
Returns the current nullable value.bool?> , provided by the RxnBoolExt extensionno setter - listenersLength → int
-
The current number of registered listeners.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentToStream ↔ bool
-
Whether the current value has been sent to the internal stream.
getter/setter pairinherited
-
stream
→ Stream<
bool?> -
no setterinherited
- string → String
-
Same as
toString()but using a getter.no setterinherited -
subject
→ StreamController<
bool?> -
no setterinherited
- value ↔ bool?
-
The current value of the object.
getter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
inherited
-
addListener(
GetStateUpdate listener) → Disposer -
Registers a
listenerand returns aDisposerto unregister it.inherited -
addListenerId(
Object? key, GetStateUpdate listener) → Disposer -
Adds a
listenerto the group identified bykey.inherited -
bindStream(
Stream< bool?> stream) → void -
Binds an existing
Stream<T>to thisRx<T>to keep the values in sync. You can bind multiple sources to update the value. Closing the subscription will happen automatically when the observer Widget (GetXorObx) gets unmounted from the Widget tree.inherited -
call(
[bool? v]) → bool? -
Makes a direct update of value adding it to the Stream
useful when you make use of Rx for custom Types to refresh your UI.
inherited
-
close(
) → void -
Close the Rx Variable
inherited
-
containsId(
Object id) → bool -
Returns
trueif a listener group with the givenidexists.inherited -
containsListener(
GetStateUpdate listener) → bool -
Returns
trueiflisteneris currently registered.inherited -
dispose(
) → void -
Disposes all listeners and marks the notifier as disposed.
inherited
-
disposeId(
Object id) → void -
To dispose an
idfrom future updates(), this ids are registered byGetBuilder()or similar, so is a way to unlink the state change with the Widget from the Controller.inherited -
listen(
void onData(bool?)?, {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< bool?> -
Calls
callbackwith current value, when the value changes.inherited -
listenAndPump(
void onData(bool? event), {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< bool?> -
Returns a StreamSubscription similar to listen, but with the
added benefit that it primes the stream with the current value, rather
than waiting for the next value. This should not be called in
onInitor anywhere else during the build process.inherited -
map<
R> (R mapper(bool? data)) → Stream< R> -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyGroupChildrens(
Object id) → void -
Reports a read to the
Notifiersystem for the group identified byid.inherited -
refresh(
) → void -
Notifies all registered listeners to trigger a rebuild.
inherited
-
refreshGroup(
Object id) → void -
Notifies all listeners in the group identified by
id.inherited -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
removeListenerId(
Object id, VoidCallback listener) → void -
Removes a
listenerfrom the group identified byid.inherited -
reportAdd(
VoidCallback disposer) → void -
Reports a disposer callback to the
Notifiersystem for cleanup.inherited -
reportRead(
) → void -
Reports a read access to the
Notifiersystem so reactive widgets can track dependencies.inherited -
toggle(
) → void -
Available on Rx<
Toggles the bool value between false and true. A shortcut forbool> , provided by the RxBoolExt extensionflag.value = !flag.value; -
toggle(
) → void -
Available on Rx<
Toggles the bool value between false and true. A shortcut forbool?> , provided by the RxnBoolExt extensionflag.value = !flag.value; -
toJson(
) → dynamic -
Returns the json representation of
value.inherited -
toString(
) → String -
A string representation of this object.
override
-
trigger(
bool? v) → void -
Following certain practices on Rx data, we might want to react to certain
listeners when a value has been provided, even if the value is the same.
At the moment, we ignore part of the process if we
.call(value)with the same value since it holds the value and there's no real need triggering the entire process for the same value inside, but there are other situations where we might be interested in triggering this.inherited -
update(
bool? fn(bool? val)) → void -
Uses a callback to update value internally, similar to
refresh, but provides the current value as the argument. Makes sense for custom Rx types (like Models).inherited
Operators
-
operator &(
bool other) → bool -
Available on Rx<
Logical AND withbool> , provided by the RxBoolExt extensionother. -
operator &(
bool other) → bool? -
Available on Rx<
Nullable logical AND withbool?> , provided by the RxnBoolExt extensionother. -
operator ==(
Object o) → bool -
This equality override works for _RxImpl instances and the internal
values.
inherited
-
operator ^(
bool other) → bool -
Available on Rx<
Logical XOR withbool> , provided by the RxBoolExt extensionother. -
operator ^(
bool other) → bool? -
Available on Rx<
Nullable logical XOR withbool?> , provided by the RxnBoolExt extensionother. -
operator |(
bool other) → bool -
Available on Rx<
Logical OR withbool> , provided by the RxBoolExt extensionother. -
operator |(
bool other) → bool? -
Available on Rx<
Nullable logical OR withbool?> , provided by the RxnBoolExt extensionother.