dispatchTo method

Cmd? dispatchTo(
  1. Element element,
  2. Msg msg
)

Dispatches msg directly to element.

Implementation

Cmd? dispatchTo(Element element, Msg msg) {
  final cmd = element.dispatch(msg);
  _flushDirtyBuilds();
  final mountInit = _owner.drainMountInitCmds();
  return _coalesceCommands([
    if (cmd != null) cmd,
    if (mountInit != null) mountInit,
  ]);
}