apply<U> method

ValueCell<U> apply<U>(
  1. U fn(
    1. T1,
    2. T2,
    3. T3,
    4. T4,
    5. T5,
    6. T6,
    7. T7,
    8. T8,
    9. T9,
    ), {
  2. dynamic key,
})

Create a ComputeCell with compute function fn with the cells in this as the argument list.

A ValueCell is returned of which the value is the result returned by fn, passing the values of the cells in this as arguments.

Whenever the value of one of the elements of this changes, fn is called again to compute the new value of the cell.

The created cell is identified by key if non-null.

Implementation

ValueCell<U> apply<U>(U Function(T1, T2, T3, T4, T5, T6, T7, T8, T9) fn, {
  key,
}) => ComputeCell(
    key: key,
    compute: () => fn($1.value, $2.value, $3.value, $4.value, $5.value, $6.value, $7.value, $8.value, $9.value),
    arguments: {$1, $2, $3, $4, $5, $6, $7, $8, $9},
);