live_cells_core 0.12.0 live_cells_core: ^0.12.0 copied to clipboard
Provides the core of live cells: A replacement for ChangeNotifier and ValueNotifier that is easier to use and more flexible
0.12.0 #
New features:
-
Record extension methods for creating lightweight computed (and mutable computed) cells:
(a, b).apply((a,b) => a + b); (a, b).mutableApply((a,b) => a + b, (v) {...});
-
changesOnly
option in cell constructors. When this option is set to true, the cell only notifies its observers when its value has actually changed. -
Relaxed restriction that
MutableCellView
only accept a single argument -
Extensions which allow Iterable, List, Map and Set methods and properties to be used directly on cells:
ValueCell<List<int>> listCell; ValueCell<int> index; ... final elementI = listCell[index]; final length = listCell.length;
Breaking changes:
CellObserver.update
now takes a seconddidChange
parameter. This only affects code that uses theCellObserver
interface directly.DependentCell
,ComputeCell
andMutableCellView
now take an argumentSet
as opposed to anargument
List. This only affects code which instantiates these classes directly.- Remove
CellListenableExtension
. This will be moved to thelive_cell_widgets
package.
Other changes:
- Removed dependency on Flutter. This package can now be used in pure Dart applications.
- Deprecated
ListComputeExtension
, i.e.[a, b].computeCell(...)
. Use the record compute extensions instead.
0.11.0 #
- Core live cell definitions extracted from
live_cells
package to this package.