RxBool class

A specialized Rx for boolean values with additional convenience methods.

Inheritance

Constructors

RxBool(bool value)
Creates a new reactive boolean with the initial value.

Properties

hashCode int
The hash code for this object.
no setterinherited
isFalse bool
Returns true if the current value is false.
no setter
isTrue bool
Returns true if the current value is true.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<bool>
Gets a stream of value changes.
no setterinherited
value bool
Gets the current value.
getter/setter pairinherited

Methods

clearListeners() → void
Removes all listeners.
inherited
dispose() → void
Disposes of the reactive value and closes the stream.
inherited
listen(void callback(bool)) VoidCallback
Adds a listener that will be called whenever the value changes.
inherited
listenWithPrevious(void callback(bool previous, bool current)) VoidCallback
Adds a listener that will be called with both the previous and the new value on every change.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(void callback(bool)) → void
Removes a specific listener.
inherited
setFalse() → void
Sets the value to false.
setTrue() → void
Sets the value to true.
toggle() → void
Toggles the boolean value.
toString() String
Returns the current value as a string.
inherited
update(bool updater(bool current)) → void
Updates the value using a function and notifies listeners if changed.
inherited

Operators

operator ==(Object other) bool
Checks equality based on the current value.
inherited