RPTaskNavigation class
The navigation of an RPUITask, handed to an RPBottomNavigationBuilder. It exposes what the default bottom bar does — advance, go back, cancel — together with the state those actions depend on, so that a custom bar can be built without reaching into the task's internals.
Constructors
-
const
Properties
- canProceed → bool
-
Whether the current step is ready to be left, i.e. whether onNext is
non-null.
final
- currentStep → RPStep?
-
The step currently on screen.
The default bar draws nothing on an RPCompletionStep,
RPVisualConsentStep or RPConsentReviewStep, since those steps carry
their own buttons. A custom bar is built on every step instead, and can
use this to make the same choice.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onBack → VoidCallback?
-
Returns to the previous step, or
nullon the first step of the task, where there is nothing to go back to. Note that the default bar is stricter than this: it only offers BACK in an RPNavigableOrderedTask. A custom bar may offer it in a linear task too.final - onCancel → VoidCallback
-
Cancels the task, after asking the participant to confirm in a dialog.
This is what the close button of the default carousel bar does. To end the
task without confirmation, call RPUITask.onCancel directly and pop the
route.
final
- onNext → VoidCallback?
-
Advances to the next step, or
nullwhile the current step is not ready to be left — an unanswered question, typically. Passing it straight to a button'sonPressedtherefore disables the button until the step is answered.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepCount → int
-
The number of steps in the task — for an RPNavigableOrderedTask not
every step is necessarily shown, so it is an upper bound rather than an
exact total.
final
- stepIndex → int
-
The zero-based index of currentStep.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited