updateData method

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

Implementation

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