live_cells_core library

This library exports the core ValueCell definitions.

Classes

ActionCell
Interface for a cell without a value, which is used to trigger an action.
ActionMetaCell
A MetaCell pointing to an ActionCell
AsyncState<T>
Base class representing the state of an asynchronous cell
AsyncStateData<T>
Represents the value state.
AsyncStateError<T>
Represents the error state.
AsyncStateLoading<T>
Represents the loading state.
CellExtension
Annotation used to specify a class for which to generate a ValueCell extension.
CellHolder
A "holder" that keeps a cell active until it is released explicitly
CellObserverModel
Provides the watch method for observing changes in cell.
CellValueCoder
Cell value encoder and decoder interface.
CellWatcher
Maintains the state of a cell watcher.
ComputeCell<T>
A cell, of which the value is computed by a user provided function.
ConstantCell<T>
A cell with a constant value.
EffectCell<T>
A cell used for running side effects and observing the result.
Maybe<T>
Container that either holds a value or an exception that was raised while computing the value.
MaybeError<T>
A Maybe that holds an error thrown during the computation of a value.
MaybeValue<T>
A Maybe that holds a value that was computed successfully.
MetaCell<T>
A cell that points to another cell.
MutableCell<T>
Interface for a ValueCell of which the value property can be set explicitly
MutableCellView<T>
A lightweight mutable computed cell that doesn't store its own value.
MutableComputeCell<T>
A cell with a value computed by a user provided function which can also be set explicitly.
MutableMetaCell<T>
A MetaCell pointing to a MutableCell
NoneCell<T>
A stateless cell which evaluates to ValueCell.none().
PrevValueCell<T>
A cell which records the stores previous value of another cell at a given time.
RestorableCell<T>
Interface for saving and restoring the state of a cell after initialization.
SelfCell<T>
A computed cell which can access its current value in the compute function.
StoreCell<T>
Value cell which stores the computed value of another ValueCell in memory.
ValueCell<T>
Base value cell interface.
Watch
A cell watch function which receives the watch state as an argument.

Extensions

ActionCellEffectExtension on ValueCell<void>
Provides the effect method for creating an EffectCell triggered by an ActionCell.
ActionCellExtension on ValueCell<void>
Provides functionality for chaining action cells
ActionMetaCellExtension on MetaCell<void>
Provides methods for handling EmptyMetaCellError
BoolCellExtension on ValueCell<bool>
Extends bool cells with logical and selection operators
BoolValueChangeExtension on ValueCell<bool>
Provides functionality for waiting until the value of a bool cell is true or false.
CellHolderExtension on ValueCell
Provides the hold method for keeping a cell active.
CellMaybeExtension on MutableCell<T>
Extends MutableCell with the maybe method for creating a MaybeCell.
CombineActionCellExtension on List<ValueCell<void>>
Provides the combined property for combining multiple action cells into one cell.
ComputeExtension on ValueCell<T>
Utility methods for creating new cells by applying functions on their values.
ConvertStringExtension on MutableCell<String>
Provides the mutableString method for String cells
DelayCellExtension on ValueCell<T>
Provides methods for creating cells that notify their observers after a delay.
DurationCellExtension on ValueCell<Duration>
Provides accessors for Duration properties on cells holding a Duration.
EffectCellExtension on ValueCell<T>
Provides the effect method for creating a cell for observing side effects.
ErrorCellExtension on ValueCell<T>
Extends ValueCell with facilities for handling exceptions thrown while computing values
IterableCellExtension on ValueCell<Iterable<T>>
Provides Iterable properties and methods directly on cells holding Iterabless.
ListCellExtension on ValueCell<List<T>>
Provides List methods directly on cells holding Lists.
MapCellExtension on ValueCell<Map<K, V>>
Provides Map methods directly on cells holding Mapss.
MaybeCellExtension on ValueCell<Maybe<T>>
Extends MaybeCell with Maybe property accessors.
MetaCellExtension on MetaCell<T>
Provides methods for handling EmptyMetaCellError.
MutableDurationCellExtension on MutableCell<Duration>
Provides accessors for Duration properties on cells holding a Duration.
MutableListCellExtension on MutableCell<List<T>>
Provides variants which return MutableCell of the methods provided by ListCellExtension.
MutableMapCellExtension on MutableCell<Map<K, V>>
Provides variants which return MutableCell of the methods provided by MapCellExtension.
MutableNullCheckExtension on MutableCell<T?>
Provides methods that check for null values.
MutableTransformExtension on MutableCell<T>
Extension to transform a single MutableCell of type T into a MutableCell of type U. U must be a subtype of T
NullCheckExtension on ValueCell<T?>
Provides methods that check for and handle null values.
NumericExtension on ValueCell<num>
Extends ValueCell with numeric operators for cells holding num values.
ParseDoubleExtension on MutableCell<double>
Provides methods for converting a double to a string and vice versa.
ParseIntExtension on MutableCell<int>
Provides methods for converting an integer to a string and vice versa.
ParseMaybeDoubleExtension on MaybeCell<double>
Provides methods for converting a double to a string and vice versa with error handling.
ParseMaybeIntExtension on MaybeCell<int>
Provides methods for converting an integer to a string and vice versa with error handling.
ParseMaybeNumExtension on MaybeCell<num>
Provides methods for converting a num to a string and vice versa with error handling.
ParseNumExtension on MutableCell<num>
Provides methods for converting a num to a string and vice versa.
PeekCellExtension on ValueCell<T>
Provides the peek property for using the value of a cell without reacting to changes.
PrevValueCellExtension on ValueCell<T>
Provides the previous property for retrieving a cell which holds the previous value of this cell.
RecordComputeExtension10 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>, ValueCell<T6>, ValueCell<T7>, ValueCell<T8>, ValueCell<T9>, ValueCell<T10>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension2 on (ValueCell<T1>, ValueCell<T2>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension3 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension4 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension5 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension6 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>, ValueCell<T6>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension7 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>, ValueCell<T6>, ValueCell<T7>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension8 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>, ValueCell<T6>, ValueCell<T7>, ValueCell<T8>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
RecordComputeExtension9 on (ValueCell<T1>, ValueCell<T2>, ValueCell<T3>, ValueCell<T4>, ValueCell<T5>, ValueCell<T6>, ValueCell<T7>, ValueCell<T8>, ValueCell<T9>)
Extends a record with a method for creating a ComputeCell by applying a function on the argument cells given in the record.
SetCellExtension on ValueCell<Set<T>>
Provides Set methods directly on cells holding Sets.
StoreCellExtension on ValueCell<T>
TransformExtension on ValueCell<T>
Extension to transform a single ValueCell of type T into a ValueCell of type U. U must be a subtype of T
ValueCellExtension on T
Adds the cell property for creating a constant cell.
ValueChangeExtension on ValueCell<T>
Provides functionality for waiting until a cell changes its value
WaitCellExtension on FutureCell<T>
Provides the wait method on a cell holding a Future.
WaitCellExtension2 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension3 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension4 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension5 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>, ValueCell<Future<T$5>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension6 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>, ValueCell<Future<T$5>>, ValueCell<Future<T$6>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension7 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>, ValueCell<Future<T$5>>, ValueCell<Future<T$6>>, ValueCell<Future<T$7>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension8 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>, ValueCell<Future<T$5>>, ValueCell<Future<T$6>>, ValueCell<Future<T$7>>, ValueCell<Future<T$8>>)
Provides the wait method on a record of cells each holding a Future
WaitCellExtension9 on (ValueCell<Future<T$1>>, ValueCell<Future<T$2>>, ValueCell<Future<T$3>>, ValueCell<Future<T$4>>, ValueCell<Future<T$5>>, ValueCell<Future<T$6>>, ValueCell<Future<T$7>>, ValueCell<Future<T$8>>, ValueCell<Future<T$9>>)
Provides the wait method on a record of cells each holding a Future

Typedefs

FutureCell<T> = ValueCell<Future<T>>
A cell, which holds a Future value.
MaybeCell<T> = MutableCell<Maybe<T>>
A MutableCell holding a Maybe value
WatchCallback = void Function()
Cell watch function signature
WatchStateCallback = void Function(CellWatcher state)
Watch (with handle argument) callback function signature.

Exceptions / Errors

EmptyMetaCellError
Thrown when accessing the value of a MetaCell that is not pointing to any cell
InactiveMetaCelLError
Thrown when accessing the value of a MetaCell that is inactive.
NullCellError
Thrown when NullCheckExtension.notNull is used on a cell holding a null value.
PendingAsyncValueError
Thrown when an async cell value is reference before it is available.
StopComputeException
Exception used to indicate that the cell's value should not be computed.
UninitializedCellError
Represents an attempt to access the value of a cell which does not yet have a value