setPhase method
Implementation
void setPhase(MissionPhaseMessage msg) {
if (!enabled) return;
missionId.value = msg.missionId;
stepIndex.value = msg.stepIndex;
phase.value = msg.phase;
final hints = msg.hints;
final action = hints['action'];
if (action is String) stepAction.value = action;
final attemptHint = hints['attempt'];
if (attemptHint is int) attempt.value = attemptHint;
final txt = hints['target_text'];
if (txt is String) stepTargetText.value = txt;
if (msg.phase == StepPhase.executing) {
lastTargetFound.value = hints.containsKey('target_stable_id') &&
hints['target_stable_id'] != null;
}
}