updateData<D> method

_ContinuationMessageAction<M, T> updateData<D>(
  1. D update(
    1. MessageContext msgCtx,
    2. M msg,
    3. D current,
    4. T ctx,
    ), {
  2. String? label,
})

Implementation

_ContinuationMessageAction<M, T> updateData<D>(
  D Function(MessageContext msgCtx, M msg, D current, T ctx) update, {
  String? label,
}) {
  return _ContinuationMessageAction<M, T>._(
    _ActionType.updateData,
    (msgCtx, msg, ctx) {
      msgCtx.dataOrThrow<D>().update((d) => update(msgCtx, msg, d, ctx));
    },
    null,
    label,
  );
}