message static method

Cmd message(
  1. Msg msg
)

A command that sends a message immediately.

Useful for triggering an immediate update without async work.

return (newModel, Cmd.message(SomeMsg()));

Implementation

static Cmd message(Msg msg) {
  return Cmd(() async => msg);
}