ActionCell.chain constructor
ActionCell.chain(
- ValueCell<
void> cell, { - dynamic key,
- required void action(),
Create an action cell chained to another cell
.
This constructor creates an action cell that when triggered by trigger,
the function action
is called. action
has the option of either
calling trigger on cell
. If action
calls trigger the observers
of both cell
and the returned cell are notified. If action
does not
call trigger, neither the observers of cell
nor the returned cell
are notified, effectively preventing the action from taking place.
When the observers of cell
are notified, by calling trigger on cell
directly, the observers of the returned cell are also notified.
The cell is identified by key
if it is non-null.
Implementation
factory ActionCell.chain(ValueCell<void> cell, {
dynamic key,
required void Function() action
}) = _ChainedActionCell;