RxInt class
A specialized Rx for integer values with additional convenience methods.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNegative → bool
-
Returns true if the current value is negative.
no setter
- isPositive → bool
-
Returns true if the current value is positive.
no setter
- isZero → bool
-
Returns true if the current value is zero.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
int> -
Gets a stream of value changes.
no setterinherited
- value ↔ int
-
Gets the current value.
getter/setter pairinherited
Methods
-
add(
int amount) → void - Adds the specified amount to the current value.
-
clearListeners(
) → void -
Removes all listeners.
inherited
-
decrement(
) → void - Decrements the value by 1.
-
dispose(
) → void -
Disposes of the reactive value and closes the stream.
inherited
-
increment(
) → void - Increments the value by 1.
-
listen(
void callback(int amount)) → VoidCallback -
Adds a listener that will be called whenever the value changes.
inherited
-
listenWithPrevious(
void callback(int previous, int current)) → VoidCallback -
Adds a listener that will be called with both the previous and the new
value on every change.
inherited
-
multiply(
int factor) → void - Multiplies the current value by the specified factor.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
void callback(int amount)) → void -
Removes a specific listener.
inherited
-
subtract(
int amount) → void - Subtracts the specified amount from the current value.
-
toString(
) → String -
Returns the current value as a string.
inherited
-
update(
int updater(int 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