MissionMessage class

Backend → Frontend.

Constructors

MissionMessage({required String missionId, required List<MissionStep> steps, String? goal, bool continueOnFailure = false, int? invalidStepIndex, int? declaredStepCount})
const
MissionMessage.fromJson(Map<String, dynamic> json)
Strict parse: throws on a missing mission_id or any malformed step.
factory

Properties

continueOnFailure → bool
Tour semantics (Android MissionMessage.continueOnFailure): a failed step is reported as a non-terminal step_failed and SKIPPED instead of aborting the mission. Parsed strictly — only a JSON true turns it on.
final
declaredStepCount → int
How many steps the frame declared (parsed or not) — steps_total on the terminal frame of a malformed mission.
no setter
goal → String?
Optional human-readable goal.
final
hashCode → int
The hash code for this object.
no setterinherited
invalidStepIndex → int?
Index of the first step that could not be parsed, or null for a well-formed mission. A malformed mission is still dispatched so the runner can answer failed failure_reason=invalid_mission instead of silently dropping the frame.
final
isValid → bool
no setter
missionId → String
Backend-assigned ID.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
steps → List<MissionStep>
final
type → String
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

tryParse(Map<String, dynamic> json) → MissionMessage?
Defensive parse. Null ONLY when mission_id is missing / not a non-empty string (nothing can be reported back for such a frame). A malformed step yields a mission with invalidStepIndex set.

Constants

kType → const String