TutorialStepWithWaiting class abstract
A tutorial step that involves waiting for a condition to be met.
This class extends TutorialStepWithID and adds functionality for waiting for a condition with a timeout, and optionally replaying a step if the condition is not met.
- Inheritance
-
- Object
- TutorialStep
- TutorialStepWithID
- TutorialStepWithWaiting
- Implementers
Constructors
- TutorialStepWithWaiting({required TutorialID tutorialID, dynamic loadFromRepository()?, Duration? duration, TutorialStep? replayStep, void onFinished(TutorialBloc?)?})
- Creates a TutorialStepWithWaiting with the given parameters.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- loadFromRepository → dynamic Function()?
-
A function to load data from a repository
finalinherited
- onFinished → void Function(TutorialBloc?)
-
A function to call when the step is finished successfully.
final
- replayStep → TutorialStep?
-
An optional step to replay if the condition is not met within the timeout.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
The maximum duration to wait for the condition to be met.
final
- tutorialID → TutorialID
-
The unique enum identifier for this tutorial step.
finalinherited
Methods
-
execute(
TutorialBloc? tutorialBloc) → Future< void> -
Executes the waiting step.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performConditionCheck(
) → Future< bool> - Performs the condition check for this waiting step.
-
setLoadingFunction(
{required TutorialRepository tutorialRepository}) → TutorialStepWithID -
Sets the loading function for this step using the provided
tutorialRepository
.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
conditionWithSubscription(
Duration timeout, Completer< bool> completer, StreamSubscription subscription) → Future<bool> - Waits for a condition to be met using a StreamSubscription, with a timeout.
-
conditionWithTimeout(
Duration timeout, bool condition()) → Future< bool> - Periodically checks a condition until it is met or a timeout occurs.