RxBool class

Rx class for bool Type.

Constructors

RxBool([bool initial])

Properties

canUpdate bool
read-only, inherited
firstRebuild bool
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stream Stream<bool>
read-only, inherited
string String
Same as toString() but using a getter.
read-only, inherited
subject StreamController<bool>
read / write, inherited
value bool
Returns the current value
read / write, inherited

Methods

addListener(Stream<bool> rxGetx) → void
This is an internal method. Subscribe to changes on the inner stream.
inherited
bindStream(Stream<bool> stream) → void
Binds an existing Stream<T> to this Rx
inherited
call([bool v]) bool
Makes this Rx looks like a function so you can update a new value using rx(someOtherValue). Practical to assign the Rx directly to some Widget that has a signature ::onChange( value ) [...]
inherited
close() → void
Closes the subscriptions for this Rx, releasing the resources.
inherited
listen(void onData(bool), {Function onError, void onDone(), bool cancelOnError}) StreamSubscription<bool>
Calls callback with current value, when the value changes.
inherited
map<R>(R mapper(bool data)) Stream<R>
inherited
nil() → void
updates the value to null and adds it to the Stream. Even with null-safety coming, is still an important feature to support, as call() doesn't accept null values. For instance, InputDecoration.errorText has to be null to not show the "error state". [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
refresh() → void
Makes a direct update of value adding it to the Stream useful when you make use of Rx for custom Types to referesh your UI. [...]
inherited
toggle() RxBool
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
toJson() → dynamic
Returns the json representation of value.
inherited
toString() String
A string representation of this object. [...]
update(void 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
operator ==(dynamic o) bool
This equality override works for _RxImpl instances and the internal values.
inherited
operator ^(bool other) bool
operator |(bool other) bool