LxDouble class
A reactive double with arithmetic extensions.
Unboxed for maximum performance compared to a generic number container.
Constructors
Properties
- equals → bool Function(double previous, double current)?
-
Custom equality function. When null, uses
==.finalinherited - graphDepth ↔ int
-
Returns the current depth in the dependency graph.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListener → bool
-
Whether there are active listeners.
no setterinherited
- id → int
-
A unique runtime identifier for this reactive instance.
finalinherited
- isDisposed → bool
-
Whether the reactive object has been closed/disposed.
no setterinherited
- isSensitive ↔ bool
-
Whether this reactive object contains sensitive data.
getter/setter pairinherited
- name ↔ String?
-
An optional descriptive name for debugging and profiling.
getter/setter pairinherited
- onCancel → void Function()?
-
Called when the stream is cancelled.
finalinherited
- onListen → void Function()?
-
Called when the stream is listened to.
finalinherited
- ownerId ↔ String?
-
The registration key of the owning controller, if applicable.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
double> -
A Stream that emits the latest value whenever it updates.
no setterinherited
- value ↔ double
-
The current state of the reactive object.
getter/setter pairinherited
Methods
-
add(
num other) → void -
Adds
otherto the current value. -
addListener(
void listener()) → void -
Adds a listener.
inherited
-
bind(
Stream< double> externalStream) → void -
Binds an external stream to this reactive variable.
inherited
-
call(
[double? v]) → double -
Updates and retrieves the value using call syntax.
inherited
-
clampValue(
double min, double max) → void -
Clamps the value between
minandmax. -
close(
) → void -
Permanently closes the reactive object and releases all internal resources.
inherited
-
dispose(
) → void -
Disposes the notifier.
inherited
-
divide(
num other) → void -
Divides the current value by
other. -
mod(
num other) → void -
Assigns the result of
value % otherto the variable. -
multiply(
num other) → void -
Multiplies the current value by
other. -
mutate(
void mutator(double value)) → void -
Mutates the value in place and triggers a refresh.
inherited
-
negate(
) → void - Negates the current value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void -
Alias for refresh.
inherited
-
refresh(
) → void -
Triggers a notification without changing the value.
inherited
-
removeListener(
void listener()) → void -
Removes a listener.
inherited
-
select<
R> (R selector(double value)) → LxComputed< R> -
Creates a specific selection of the state that only updates when the selected value changes.
inherited
-
subtract(
num other) → void -
Subtracts
otherfrom the current value. -
toString(
) → String -
A string representation of this object.
inherited
-
transform<
R> (Stream< R> transformer(Stream<double> stream)) → LxStream<R> -
Transforms the stream of changes using
transformer.inherited -
unbind(
) → void -
Unbinds any external stream.
inherited
-
updateValue(
double fn(double val)) → void -
Updates the value using a transformation function.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited