TaskNavigator class abstract

Abstract navigator that drives step-by-step progression through a SurveyDefinition. Subclasses implement the step resolution logic for ordered and branching flows.

Implementers

Constructors

TaskNavigator(SurveyDefinition task)

Properties

countSteps int
Total number of steps in the survey.
no setter
hashCode int
The hash code for this object.
no setterinherited
history ListQueue<Step>
A stack of steps the user has visited, used to support back-navigation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
task SurveyDefinition
The survey definition this navigator operates on.
final

Methods

currentStepIndex(Step step) int
Returns the zero-based index of step in the survey's step list.
firstStep() Step?
Returns the first step to display, respecting SurveyDefinition.initialStep if set.
hasPreviousStep() bool
True when there is at least one step in history to go back to.
nextInList(Step? step) Step?
Returns the step immediately after step in the ordered list, or null if step is the last.
nextStep({required Step step, required List<StepResult> previousResults, StepResult? questionResult}) Step?
Returns the step to show after step, given previousResults and the current questionResult. Returns null when the survey is finished.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peekHistory() Step?
Returns the most recently visited step without removing it from history.
previousInList(Step step) Step?
Returns the step before step for back-navigation purposes.
record(Step step) → void
Adds step to the navigation history.
toString() String
A string representation of this object.
inherited

Operators

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