RxInt class


RxInt([int initial])


bitLength int
Returns the minimum number of bits required to store this integer. [...]
canUpdate bool
read-only, inherited
firstRebuild bool
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
isEven bool
Returns true if and only if this integer is even.
isFinite bool
True if the number is finite; otherwise, false. [...]
read-only, inherited
isInfinite bool
True if the number is positive infinity or negative infinity; otherwise, false.
read-only, inherited
isNaN bool
True if the number is the double Not-a-Number value; otherwise, false.
read-only, inherited
isNegative bool
True if the number is negative; otherwise, false. [...]
read-only, inherited
isOdd bool
Returns true if and only if this integer is odd.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sign int
Returns the sign of this integer. [...]
stream Stream<int>
read-only, inherited
string String
Same as toString() but using a getter.
read-only, inherited
subject StreamController<int>
read / write, inherited
value int
Returns the current value
read / write, inherited


abs() int
Returns the absolute value of this integer. [...]
addListener(Stream<int> rxGetx) → void
This is an internal method. Subscribe to changes on the inner stream.
bindStream(Stream<int> stream) → void
Binds an existing Stream<T> to this Rx
call([int v]) int
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 ) [...]
ceil() int
Returns this.
ceilToDouble() double
Returns this.toDouble().
clamp(num lowerLimit, num upperLimit) num
Returns this num clamped to be in the range lowerLimit-upperLimit. [...]
close() → void
Closes the subscriptions for this Rx, releasing the resources.
floor() int
Returns this.
floorToDouble() double
Returns this.toDouble().
gcd(int other) int
Returns the greatest common divisor of this integer and other. [...]
listen(void onData(int), {Function onError, void onDone(), bool cancelOnError}) StreamSubscription<int>
Calls callback with current value, when the value changes.
map<R>(R mapper(int data)) Stream<R>
modInverse(int modulus) int
Returns the modular multiplicative inverse of this integer modulo modulus. [...]
modPow(int exponent, int modulus) int
Returns this integer to the power of exponent modulo modulus. [...]
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". [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
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. [...]
remainder(num other) num
Returns the remainder of the truncating division of this by other. [...]
round() int
Returns this.
roundToDouble() double
Returns this.toDouble().
toDouble() double
Return this num as a double. [...]
toInt() int
Truncates this num to an integer and returns the result as an int. */
toJson() → dynamic
Returns the json representation of value.
toSigned(int width) int
Returns the least significant width bits of this integer, extending the highest retained bit to the sign. This is the same as truncating the value to fit in width bits using an signed 2-s complement representation. The returned value has the same bit value in all positions higher than width. [...]
toString() String
A string representation of this object. [...]
toStringAsExponential([int fractionDigits]) String
Returns an exponential string-representation of this. [...]
toStringAsFixed(int fractionDigits) String
Returns a decimal-point string-representation of this. [...]
toStringAsPrecision(int precision) String
Converts this to a double and returns a string representation with exactly precision significant digits. [...]
toUnsigned(int width) int
Returns the least significant width bits of this integer as a non-negative number (i.e. unsigned representation). The returned value has zeros in all bit positions higher than width. [...]
truncate() int
Returns this.
truncateToDouble() double
Returns this.toDouble().
update(void fn(int 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). [...]


operator %(num other) num
Euclidean modulo operator. [...]
operator &(int other) int
Bit-wise and operator. [...]
operator *(num other) num
Addition operator. */ Multiplication operator.
operator +(int other) RxInt
Addition operator.
operator -(int other) RxInt
Subtraction operator.
operator /(num other) double
Division operator.
operator <(num other) bool
Relational less than operator.
operator <<(int shiftAmount) int
Shift the bits of this integer to the left by shiftAmount. [...]
operator <=(num other) bool
Relational less than or equal operator.
operator ==(dynamic o) bool
This equality override works for _RxImpl instances and the internal values.
operator >(num other) bool
Relational greater than operator.
operator >=(num other) bool
Relational greater than or equal operator.
operator >>(int shiftAmount) int
Shift the bits of this integer to the right by shiftAmount. [...]
operator ^(int other) int
Bit-wise exclusive-or operator. [...]
operator unary-() int
Return the negative value of this integer. [...]
operator |(int other) int
Bit-wise or operator. [...]
operator ~() int
The bit-wise negate operator. [...]
operator ~/(num other) int
Truncating division operator. [...]