ValuableNumOperation<Output extends num> class
Class to do calculus with numeric operands, and obtain a Valuable<num>.
When one of its operands changes, this Valuable notify its listeners
- Inheritance
-
- Object
- ChangeNotifier
- Valuable<
Output> - ValuableNumOperation
- Available extensions
Properties
- evaluateWithContext → bool
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDisposed → bool
-
Returns if this Object is already disposed
no setterinherited
- isMounted → bool
-
Returns if this object is still mounted
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- valuableContext → ValuableContext?
-
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
cleanWatched(
) → void -
inherited
-
dispose(
) → void -
Should be called to clean all links to other Valuables, and all the rest
inherited
-
getValue(
[ValuableContext? context]) → Output -
Get the current value of the Valuable
inherited
-
getValueDefinition(
bool reevaluatingNeeded, [ValuableContext? context]) → Output -
This method should be redefined in ever sub-classes to determine how works
the method getValue
override
-
historize(
) → HistorizedValuable< Output> -
Build an HistorizedValuable based on this Valuable
inherited
-
listenDispose(
VoidCallback onDispose) → VoidCallback -
Allows to be notified when this Valuable is disposed
inherited
-
markToReevaluate(
) → void -
Mark the valuable to be reevaluated
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onValuableChange(
) → void -
Called when a Valuable notify a change.
inherited
-
onWatchedValuableDispose(
Valuable _) → void -
Allows inheriting classes to react when a watched Valuable is disposed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toComputedValuable<
T> (T computation(L listenable), [ValuableScope? scope]) → Valuable< T> -
Available on L, provided by the ListenableValuable extension
Method to transform a ValueListenable to a Valuable -
toString(
) → String -
A string representation of this object.
inherited
-
watch<
T> (Valuable< T> valuable, {ValuableContext? valuableContext, ValuableWatcherSelector<T> ? selector}) → T -
Watch a valuable, that eventually change
inherited
Operators
-
operator %(
Valuable< num> other) → Valuable<num> -
Available on Valuable<
Euclidean modulo operator.T> , provided by the NumOperators extension -
operator *(
Valuable< num> other) → Valuable<num> -
Available on Valuable<
Multiplication operator.T> , provided by the NumOperators extension -
operator +(
Valuable< num> other) → Valuable<num> -
Available on Valuable<
Addition operator.T> , provided by the NumOperators extension -
operator -(
Valuable< num> other) → Valuable<num> -
Available on Valuable<
Subtraction operator.T> , provided by the NumOperators extension -
operator /(
Valuable< num> other) → Valuable<double> -
Available on Valuable<
Division operator.T> , provided by the NumOperators extension -
operator <(
dynamic other) → Valuable< bool> -
Compare with a value that type is
Outputor another Valuableinherited -
operator <=(
dynamic other) → Valuable< bool> -
Compare with a value that type is
Outputor another Valuableinherited -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
dynamic other) → Valuable< bool> -
Compare with a value that type is
Outputor another Valuableinherited -
operator >=(
dynamic other) → Valuable< bool> -
Compare with a value that type is
Outputor another Valuableinherited -
operator unary-(
) → Valuable< num> -
Available on Valuable<
Negate operator.T> , provided by the NumOperators extension -
operator ~/(
Valuable< num> other) → Valuable<int> -
Available on Valuable<
Truncating division operator.T> , provided by the NumOperators extension
Static Methods
-
divide(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<double> - Division operation
-
modulo(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<num> - Modulo operation
-
multiply(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<num> - Multiplication operation
-
negate(
Valuable< num> operand1) → ValuableNumOperation<num> - Negate operation
-
substract(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<num> - Subtraction operation
-
subtract(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<num> - Subtraction operation
-
sum(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<num> - Sum operation
-
truncDivide(
Valuable< num> operand1, Valuable<num> operand2) → ValuableNumOperation<int> - Trunctature division operation