update method

Cmd? update(
  1. Msg msg
)

Updates the model using the provided msg.

Returns the Cmd produced by the model update.

Implementation

Cmd? update(Msg msg) {
  final (next, cmd) = _model.update(msg);
  if (!identical(next, _model)) {
    _model = next;
    notifyListeners();
  }
  return cmd;
}