action<K extends Object> method

Trigger<K> action<K extends Object>(
  1. T fn(
    1. T value,
    2. K arg
    )
)

Implementation

Trigger<K> action<K extends Object>(T Function(T value, K arg) fn) {
  final t = _unit.owner.trigger<K>();
  t.handler((arg) => update((v) => fn(v, arg)), value);

  return t;
}