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
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
stepin 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
stepin the ordered list, or null ifstepis the last. -
nextStep(
{required Step step, required List< StepResult> previousResults, StepResult? questionResult}) → Step? -
Returns the step to show after
step, givenpreviousResultsand the currentquestionResult. 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
stepfor back-navigation purposes. -
record(
Step step) → void -
Adds
stepto the navigation history. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited